public class Response extends Object
Constructor and Description |
---|
Response(InputStream stream,
int statusCode)
Create a Response from input stream and status code.
|
Response(String content,
int statusCode)
Create a Response from content string and status code.
|
Modifier and Type | Method and Description |
---|---|
String |
getContent()
Get the the content of the response.
|
int |
getStatusCode() |
InputStream |
getStream()
Get response data as stream.
|
public Response(String content, int statusCode)
content
- content stringstatusCode
- status codepublic Response(InputStream stream, int statusCode)
stream
- input streamstatusCode
- status codepublic 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()
Copyright © 2011 Twilio, Inc. All Rights Reserved.