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 |
|---|---|
NWebResponse |
failFast() |
NHttpCode |
getCode() |
NInputSource |
getContent() |
<T> List<T> |
getContentArrayAsJson() |
<T> T |
getContentAs(Class<T> clz,
NContentType type) |
byte[] |
getContentAsBytes() |
<T> T |
getContentAsJson(Class<T> clz) |
List<?> |
getContentAsJsonList() |
Map<?,?> |
getContentAsJsonMap() |
String |
getContentAsString() |
<K> List<K> |
getContentListAsJson() |
<K,V> Map<K,V> |
getContentMapAsJson() |
String |
getContentType() |
NWebCookie[] |
getCookies() |
NOptional<String> |
getHeader(String name) |
Map<String,List<String>> |
getHeaders() |
List<String> |
getHeaders(String name) |
int |
getIntCode() |
NMsg |
getMsg() |
NMsgCode |
getMsgCode() |
boolean |
isError() |
boolean |
isOk() |
NWebResponse |
setMsgCode(NMsgCode msgCode) |
public NOptional<String> getHeader(String name)
getHeader in interface NWebResponsepublic int getIntCode()
getIntCode in interface NWebResponsepublic NHttpCode getCode()
getCode in interface NWebResponsepublic NMsg getMsg()
getMsg in interface NWebResponsepublic List<String> getHeaders(String name)
getHeaders in interface NWebResponsepublic Map<String,List<String>> getHeaders()
getHeaders in interface NWebResponsepublic NInputSource getContent()
getContent in interface NWebResponsepublic <K,V> Map<K,V> getContentMapAsJson()
getContentMapAsJson in interface NWebResponsepublic <K> List<K> getContentListAsJson()
getContentListAsJson in interface NWebResponsepublic <T> List<T> getContentArrayAsJson()
getContentArrayAsJson in interface NWebResponsepublic <T> T getContentAs(Class<T> clz, NContentType type)
getContentAs in interface NWebResponsepublic <T> T getContentAsJson(Class<T> clz)
getContentAsJson in interface NWebResponsepublic Map<?,?> getContentAsJsonMap()
getContentAsJsonMap in interface NWebResponsepublic List<?> getContentAsJsonList()
getContentAsJsonList in interface NWebResponsepublic String getContentAsString()
getContentAsString in interface NWebResponsepublic byte[] getContentAsBytes()
getContentAsBytes in interface NWebResponsepublic NWebCookie[] getCookies()
getCookies in interface NWebResponsepublic boolean isError()
isError in interface NWebResponsepublic boolean isOk()
isOk in interface NWebResponsepublic NWebResponse failFast()
failFast in interface NWebResponsepublic NMsgCode getMsgCode()
getMsgCode in interface NWebResponsepublic NWebResponse setMsgCode(NMsgCode msgCode)
setMsgCode in interface NWebResponsepublic String getContentType()
getContentType in interface NWebResponseCopyright © 2026 vpc open source initiative. All rights reserved.