libgdx API

com.badlogic.gdx
Interface Net.HttpResponse

Enclosing interface:
Net

public static interface Net.HttpResponse

HTTP response interface with methods to get the response data as a byte[], a String or an InputStream.


Method Summary
 byte[] getResult()
          Returns the data of the HTTP response as a byte[].
 java.io.InputStream getResultAsStream()
          Returns the data of the HTTP response as an InputStream.
 java.lang.String getResultAsString()
          Returns the data of the HTTP response as a String.
 Net.HttpStatus getStatus()
          Returns the Net.HttpStatus containing the statusCode of the HTTP response.
 

Method Detail

getResult

byte[] getResult()
Returns the data of the HTTP response as a byte[].

Returns:
the result as a byte[] or null in case of a timeout or if the operation was canceled/terminated abnormally. The timeout is specified when creating the HTTP request, with Net.HttpRequest.setTimeOut(int)

getResultAsString

java.lang.String getResultAsString()
Returns the data of the HTTP response as a String.

Returns:
the result as a string or null in case of a timeout or if the operation was canceled/terminated abnormally. The timeout is specified when creating the HTTP request, with Net.HttpRequest.setTimeOut(int)

getResultAsStream

java.io.InputStream getResultAsStream()
Returns the data of the HTTP response as an InputStream.

Returns:
An InputStream with the Net.HttpResponse data.

getStatus

Net.HttpStatus getStatus()
Returns the Net.HttpStatus containing the statusCode of the HTTP response.


libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)