HttpResponse Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. provisioning. device. transport. https. HttpResponse
- com.
public class HttpResponse
An HTTPS response. Contains the status code, body, header fields, and error reason (if any).
Constructor Summary
Constructor | Description | |
---|---|---|
HttpResponse() | ||
HttpResponse(int status, byte[] body, Map<String, List<String>> headerFields, byte[] errorReason) |
Constructor. |
Method Summary
Modifier and Type | Method and Description |
---|---|
byte [] |
getBody()
Getter for the response body. |
byte [] |
getErrorReason()
Getter for the error reason. |
String |
getHeaderField(String field)
Getter for a header field. |
Map<String, String> |
getHeaderFields()
Getter for the header fields. |
int |
getStatus()
Getter for the HTTPS status code. |
boolean | isFieldAvailable(String field) |
Constructor Details
HttpResponse
protected HttpResponse()
HttpResponse
public HttpResponse(int status, byte[] body, Map
Constructor.
Parameters:
Method Details
getBody
public byte [] getBody()
Getter for the response body.
Returns:
getErrorReason
public byte [] getErrorReason()
Getter for the error reason.
Returns:
getHeaderField
public String getHeaderField(String field)
Getter for a header field.
Parameters:
Returns:
Throws:
getHeaderFields
public Map
Getter for the header fields.
Returns:
getStatus
public int getStatus()
Getter for the HTTPS status code.
Returns:
isFieldAvailable
public boolean isFieldAvailable(String field)
Parameters:
Applies to
Azure SDK for Java