public class Dynamic extends Object implements io.apimatic.coreinterfaces.http.response.DynamicType
| Constructor and Description |
|---|
Dynamic(io.apimatic.coreinterfaces.http.response.Response responseBody)
Instantiate class.
|
| Modifier and Type | Method and Description |
|---|---|
io.apimatic.coreinterfaces.http.HttpHeaders |
getHeaders()
Get response headers for the HTTP response.
|
InputStream |
getRawBody()
Get the raw stream for the response body.
|
<T> T |
parse(Class<T> cls)
Parse response as instance of class cls.
|
boolean |
parseAsBoolean()
Parse response as boolean.
|
byte |
parseAsByte()
Parse response as boolean.
|
char |
parseAsCharacter()
Parse response as character.
|
Map<String,Object> |
parseAsDictionary()
Parse response as a map of keys and values.
|
double |
parseAsDouble()
Parse response as double.
|
float |
parseAsFloat()
Parse response as float.
|
int |
parseAsInteger()
Parse response as integer.
|
long |
parseAsLong()
Parse response as long.
|
short |
parseAsShort()
Parse response as short.
|
String |
parseAsString()
Parse response as string.
|
public Dynamic(io.apimatic.coreinterfaces.http.response.Response responseBody)
responseBody - The object of HttpResponse.public <T> T parse(Class<T> cls) throws ParseException
parse in interface io.apimatic.coreinterfaces.http.response.DynamicTypeT - The type of class to be parsed.cls - Class to be parsed.ParseException - Signals if a parse exception occurred.public boolean parseAsBoolean()
throws ParseException
parseAsBoolean in interface io.apimatic.coreinterfaces.http.response.DynamicTypeParseException - Signals if a parse exception occurred.public byte parseAsByte()
throws ParseException
parseAsByte in interface io.apimatic.coreinterfaces.http.response.DynamicTypeParseException - Signals if a parse exception occurred.public char parseAsCharacter()
throws ParseException
parseAsCharacter in interface io.apimatic.coreinterfaces.http.response.DynamicTypeParseException - Signals if a parse exception occurred.public float parseAsFloat()
throws ParseException
parseAsFloat in interface io.apimatic.coreinterfaces.http.response.DynamicTypeParseException - Signals if a parse exception occurred.public int parseAsInteger()
throws ParseException
parseAsInteger in interface io.apimatic.coreinterfaces.http.response.DynamicTypeParseException - Signals if a parse exception occurred.public long parseAsLong()
throws ParseException
parseAsLong in interface io.apimatic.coreinterfaces.http.response.DynamicTypeParseException - Signals if a parse exception occurredpublic short parseAsShort()
throws ParseException
parseAsShort in interface io.apimatic.coreinterfaces.http.response.DynamicTypeParseException - Signals if a parse exception occurred.public double parseAsDouble()
throws ParseException
parseAsDouble in interface io.apimatic.coreinterfaces.http.response.DynamicTypeParseException - Signals if a parse exception occurred.public String parseAsString() throws ParseException
parseAsString in interface io.apimatic.coreinterfaces.http.response.DynamicTypeParseException - Signals if a parse exception occurred.public Map<String,Object> parseAsDictionary() throws ParseException
parseAsDictionary in interface io.apimatic.coreinterfaces.http.response.DynamicTypeParseException - Signals if a parse exception occurred.public InputStream getRawBody()
getRawBody in interface io.apimatic.coreinterfaces.http.response.DynamicTypepublic io.apimatic.coreinterfaces.http.HttpHeaders getHeaders()
getHeaders in interface io.apimatic.coreinterfaces.http.response.DynamicTypeCopyright © 2023. All rights reserved.