Package com.netlang.net
Class NHttpResponse
java.lang.Object
com.netlang.net.NHttpResponse
Class that implements a HTTPResponse.
-
Method Summary
Modifier and TypeMethodDescriptionvoidconsume()Consume content<T> Tbyte[]getContent(String encoding) org.apache.http.HttpResponse<T> List<T><T> com.netlang.api.model.QueryResultSet<T>int<T> TmakeObject(NHttpResponse response, Class<? extends T> responseClass) voidvoidsaveContent(NetlangFile file) voidsaveContent(File file) voidsaveContent(String file) voidsaveContent(String resourceid, String filepath)
-
Method Details
-
consume
public void consume()Consume content -
getInternalResponse
public org.apache.http.HttpResponse getInternalResponse() -
getStatusCode
public int getStatusCode() -
getHeader
-
getHeaders
-
getContentAsString
- Throws:
org.apache.http.ParseExceptionIOException
-
getContentUTF8
- Throws:
org.apache.http.ParseExceptionIOException
-
getContent
- Throws:
org.apache.http.ParseExceptionIOException
-
getContent
- Throws:
org.apache.http.ParseExceptionIOException
-
saveContent
- Throws:
Exception
-
saveContent
- Throws:
Exception
-
saveContent
- Throws:
com.net4z.APIException
-
saveContent
- Throws:
com.net4z.APIException
-
getList
- Throws:
NHttpException
-
getQuery
public <T> com.netlang.api.model.QueryResultSet<T> getQuery(Class<? extends T> responseClass) throws NHttpException - Throws:
NHttpException
-
getBody
- Throws:
NHttpException
-
makeObject
- Throws:
Exception
-
save
public void save(com.netlang.session.NetlangSession session, String resourceid, String filepath) throws com.net4z.APIException - Throws:
com.net4z.APIException
-