Package org.duracloud.common.web
Class RestHttpHelper.HttpResponse
- java.lang.Object
-
- org.duracloud.common.web.RestHttpHelper.HttpResponse
-
- Enclosing class:
- RestHttpHelper
public static class RestHttpHelper.HttpResponse extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.http.HttpResponseresponse
-
Constructor Summary
Constructors Constructor Description HttpResponse(org.apache.http.HttpResponse response)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RestHttpHelper.HttpResponsebuildMock(int statusCode, org.apache.http.Header[] responseHeaders, InputStream responseStream)Provided for testing of Http responsesStringgetResponseBody()org.apache.http.HeadergetResponseHeader(String headerName)org.apache.http.Header[]getResponseHeaders()InputStreamgetResponseStream()intgetStatusCode()
-
-
-
Method Detail
-
getStatusCode
public int getStatusCode()
-
getResponseStream
public InputStream getResponseStream() throws IOException
- Throws:
IOException
-
getResponseBody
public String getResponseBody() throws IOException
- Throws:
IOException
-
getResponseHeaders
public org.apache.http.Header[] getResponseHeaders()
-
getResponseHeader
public org.apache.http.Header getResponseHeader(String headerName)
-
buildMock
public static RestHttpHelper.HttpResponse buildMock(int statusCode, org.apache.http.Header[] responseHeaders, InputStream responseStream)
Provided for testing of Http responses
-
-