public class NHttpResponseImpl extends Object implements NHttpResponse
| Constructor and Description |
|---|
NHttpResponseImpl(NHttpCode code,
NMsg msg,
Map<String,List<String>> headers,
Supplier<NInputSource> content) |
| Modifier and Type | Method and Description |
|---|---|
NInputSource |
content() |
<T> List<T> |
contentArrayAsJson() |
<T> T |
contentAs(Class<T> clz,
NContentType type) |
byte[] |
contentAsBytes() |
NElement |
contentAsJson() |
<T> T |
contentAsJson(Class<T> clz) |
List<?> |
contentAsJsonList() |
Map<?,?> |
contentAsJsonMap() |
String |
contentAsString() |
<K> List<K> |
contentListAsJson() |
<K,V> Map<K,V> |
contentMapAsJson() |
String |
contentType() |
List<NHttpCookie> |
cookies() |
NHttpResponse |
failFast() |
Map<String,String> |
firstHeaders() |
NOptional<String> |
header(String name) |
Map<String,List<String>> |
headers() |
List<String> |
headers(String name) |
NHttpResponse |
ifErrorThrow() |
int |
intStatusCode() |
boolean |
isClientError() |
boolean |
isError() |
boolean |
isOk() |
boolean |
isRedirect() |
boolean |
isServerError() |
NHttpCode |
statusCode() |
NMsg |
statusMessage() |
NMsgCode |
userMessage() |
NHttpResponse |
userMessage(NMsgCode msgCode) |
public NOptional<String> header(String name)
header in interface NHttpResponsepublic int intStatusCode()
intStatusCode in interface NHttpResponsepublic NHttpCode statusCode()
statusCode in interface NHttpResponsepublic NMsg statusMessage()
statusMessage in interface NHttpResponsepublic List<String> headers(String name)
headers in interface NHttpResponsepublic Map<String,String> firstHeaders()
firstHeaders in interface NHttpResponsepublic NInputSource content()
content in interface NHttpResponsepublic <K,V> Map<K,V> contentMapAsJson()
contentMapAsJson in interface NHttpResponsepublic <K> List<K> contentListAsJson()
contentListAsJson in interface NHttpResponsepublic <T> List<T> contentArrayAsJson()
contentArrayAsJson in interface NHttpResponsepublic <T> T contentAs(Class<T> clz, NContentType type)
contentAs in interface NHttpResponsepublic NElement contentAsJson()
contentAsJson in interface NHttpResponsepublic <T> T contentAsJson(Class<T> clz)
contentAsJson in interface NHttpResponsepublic Map<?,?> contentAsJsonMap()
contentAsJsonMap in interface NHttpResponsepublic List<?> contentAsJsonList()
contentAsJsonList in interface NHttpResponsepublic String contentAsString()
contentAsString in interface NHttpResponsepublic byte[] contentAsBytes()
contentAsBytes in interface NHttpResponsepublic List<NHttpCookie> cookies()
cookies in interface NHttpResponsepublic boolean isError()
isError in interface NHttpResponsepublic boolean isOk()
isOk in interface NHttpResponsepublic NHttpResponse ifErrorThrow()
ifErrorThrow in interface NHttpResponsepublic NHttpResponse failFast()
failFast in interface NHttpResponsepublic boolean isClientError()
isClientError in interface NHttpResponsepublic boolean isServerError()
isServerError in interface NHttpResponsepublic boolean isRedirect()
isRedirect in interface NHttpResponsepublic NMsgCode userMessage()
userMessage in interface NHttpResponsepublic NHttpResponse userMessage(NMsgCode msgCode)
userMessage in interface NHttpResponsepublic String contentType()
contentType in interface NHttpResponseCopyright © 2026 vpc open source initiative. All rights reserved.