org.eclipse.egit.github.core.client
Class GitHubResponse

java.lang.Object
  extended by org.eclipse.egit.github.core.client.GitHubResponse

public class GitHubResponse
extends Object

GitHub API response class that provides the parsed response body as well as any links to the first, previous, next, and last responses.


Field Summary
protected  Object body
          Response body
protected  PageLinks links
          Links to other pages
protected  HttpURLConnection response
          HTTP response
 
Constructor Summary
GitHubResponse(HttpURLConnection response, Object body)
          Create response
 
Method Summary
 Object getBody()
          Parsed response body
 String getFirst()
          Get link uri to first page
 String getHeader(String name)
          Get header value
 String getLast()
          Get link uri to last page
protected  PageLinks getLinks()
          Get page links
 String getNext()
          Get link uri to next page
 String getPrevious()
          Get link uri to previous page
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

response

protected final HttpURLConnection response
HTTP response


body

protected final Object body
Response body


links

protected PageLinks links
Links to other pages

Constructor Detail

GitHubResponse

public GitHubResponse(HttpURLConnection response,
                      Object body)
Create response

Parameters:
response -
body -
Method Detail

getHeader

public String getHeader(String name)
Get header value

Parameters:
name -
Returns:
value

getLinks

protected PageLinks getLinks()
Get page links

Returns:
links

getFirst

public String getFirst()
Get link uri to first page

Returns:
possibly null uri

getPrevious

public String getPrevious()
Get link uri to previous page

Returns:
possibly null uri

getNext

public String getNext()
Get link uri to next page

Returns:
possibly null uri

getLast

public String getLast()
Get link uri to last page

Returns:
possibly null uri

getBody

public Object getBody()
Parsed response body

Returns:
body


Copyright © 2012. All Rights Reserved.