|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HttpParser
Parses HTTP response content into an data class of key/value pairs.
| Method Summary | ||
|---|---|---|
String |
getContentType()
Returns the content type. |
|
|
parse(HttpResponse response,
Class<T> dataClass)
Parses the given HTTP response into a new instance of the the given data class of key/value pairs. |
|
| Method Detail |
|---|
String getContentType()
<T> T parse(HttpResponse response,
Class<T> dataClass)
throws IOException
How the parsing is performed is not restricted by this interface, and is instead defined by the
concrete implementation. Implementations should check HttpResponse.isSuccessStatusCode
to know whether they are parsing a success or error response.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||