public class Response extends Object
Constructor and Description |
---|
Response(InputStream stream,
int statusCode)
Create a Response from input stream and status code.
|
Response(InputStream stream,
int statusCode,
org.apache.http.Header[] headers)
Create a Response from input stream, status code, and headers.
|
Response(String content,
int statusCode)
Create a Response from content string and status code.
|
Response(String content,
int statusCode,
org.apache.http.Header[] headers)
Create a Response from content string, status code, and headers.
|
Modifier and Type | Method and Description |
---|---|
String |
getContent()
Get the the content of the response.
|
org.apache.http.Header[] |
getHeaders() |
int |
getStatusCode() |
InputStream |
getStream()
Get response data as stream.
|
public Response(String content, int statusCode)
content
- content stringstatusCode
- status codepublic Response(String content, int statusCode, org.apache.http.Header[] headers)
content
- content stringstatusCode
- status codeheaders
- headerspublic Response(InputStream stream, int statusCode)
stream
- input streamstatusCode
- status codepublic Response(InputStream stream, int statusCode, org.apache.http.Header[] headers)
stream
- input streamstatusCode
- status codeheaders
- headerspublic String getContent()
If there is a content string, that will be returned. Otherwise, will get content from input stream
public InputStream getStream()
public int getStatusCode()
public org.apache.http.Header[] getHeaders()
Copyright © 2019 Twilio, Inc. All Rights Reserved.