Package com.github.alexdlaird.http
Class Response<T>
java.lang.Object
com.github.alexdlaird.http.Response<T>
public class Response<T>
extends java.lang.Object
A response from the
HttpClient
.-
Constructor Summary
-
Method Summary
Modifier and Type Method Description T
getBody()
java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getHeaderFields()
int
getStatusCode()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Response
public Response(int statusCode, T body, java.lang.String bodyRaw, java.util.Map<java.lang.String,java.util.List<java.lang.String>> headerFields)Construct a response.- Parameters:
statusCode
- The response code.body
- The body of the response.bodyRaw
- The unparsed body of the response.headerFields
- Header fields in the response.
-
-
Method Details
-
getStatusCode
public int getStatusCode() -
getBody
-
getHeaderFields
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaderFields()
-