public class NWebResponseImpl extends Object implements NWebResponse
| Constructor and Description |
|---|
NWebResponseImpl(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<NWebCookie> |
cookies() |
NOptional<String> |
header(String name) |
Map<String,List<String>> |
headers() |
List<String> |
headers(String name) |
NWebResponse |
ifErrorThrow() |
int |
intStatusCode() |
boolean |
isClientError() |
boolean |
isError() |
boolean |
isOk() |
boolean |
isRedirect() |
boolean |
isServerError() |
NHttpCode |
statusCode() |
NMsg |
statusMessage() |
NMsgCode |
userMessage() |
NWebResponse |
userMessage(NMsgCode msgCode) |
public NOptional<String> header(String name)
header in interface NWebResponsepublic int intStatusCode()
intStatusCode in interface NWebResponsepublic NHttpCode statusCode()
statusCode in interface NWebResponsepublic NMsg statusMessage()
statusMessage in interface NWebResponsepublic List<String> headers(String name)
headers in interface NWebResponsepublic NInputSource content()
content in interface NWebResponsepublic <K,V> Map<K,V> contentMapAsJson()
contentMapAsJson in interface NWebResponsepublic <K> List<K> contentListAsJson()
contentListAsJson in interface NWebResponsepublic <T> List<T> contentArrayAsJson()
contentArrayAsJson in interface NWebResponsepublic <T> T contentAs(Class<T> clz, NContentType type)
contentAs in interface NWebResponsepublic NElement contentAsJson()
contentAsJson in interface NWebResponsepublic <T> T contentAsJson(Class<T> clz)
contentAsJson in interface NWebResponsepublic Map<?,?> contentAsJsonMap()
contentAsJsonMap in interface NWebResponsepublic List<?> contentAsJsonList()
contentAsJsonList in interface NWebResponsepublic String contentAsString()
contentAsString in interface NWebResponsepublic byte[] contentAsBytes()
contentAsBytes in interface NWebResponsepublic List<NWebCookie> cookies()
cookies in interface NWebResponsepublic boolean isError()
isError in interface NWebResponsepublic boolean isOk()
isOk in interface NWebResponsepublic NWebResponse ifErrorThrow()
ifErrorThrow in interface NWebResponsepublic boolean isClientError()
isClientError in interface NWebResponsepublic boolean isServerError()
isServerError in interface NWebResponsepublic boolean isRedirect()
isRedirect in interface NWebResponsepublic NMsgCode userMessage()
userMessage in interface NWebResponsepublic NWebResponse userMessage(NMsgCode msgCode)
userMessage in interface NWebResponsepublic String contentType()
contentType in interface NWebResponseCopyright © 2026 vpc open source initiative. All rights reserved.