public.javadoc.org.spincast.plugins.httpclient.HttpResponse.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
HttpResponse (org.spincast:spincast-framework 1.13.0 API)
org.spincast.plugins.httpclient
Interface HttpResponse
-
- All Known Implementing Classes:
- HttpResponseDefault
public interface HttpResponse
-
-
Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type
Method and Description
byte[]
getContentAsByteArray()
Get the content as byte[]
.
JsonObject
getContentAsJsonObject()
Gets the content as a JsonObject.
String
getContentAsString()
Gets the content as a UTF-8
String.
String
getContentAsString(String encoding)
Gets the content as a String using the specified
encoding.
String
getContentType()
Gets the Content-Type.
Cookie
getCookie(String name)
Gets a cookie.
Map<String,Cookie>
getCookies()
Gets the cookies.
String
getCookieValue(String name)
Gets the value of a cookie.
List<String>
getHeader(String name)
Gets an header.
String
getHeaderFirst(String name)
Gets the first value of an header.
Map<String,List<String>>
getHeaders()
Gets the headers.
int
getStatus()
Gets the HTTP status.
boolean
isGzipped()
Is the response gzipped?
-
-
Method Detail
-
getStatus
int getStatus()
Gets the HTTP status.
-
getContentType
String getContentType()
Gets the Content-Type.
-
getHeader
List<String> getHeader(String name)
Gets an header. An header can have more than
one value.
-
getCookieValue
String getCookieValue(String name)
Gets the value of a cookie.
- Returns:
- the value of the cookie or
null
if the cookie doesn't
exist.
-
isGzipped
boolean isGzipped()
Is the response gzipped?
-
getContentAsString
String getContentAsString()
Gets the content as a UTF-8
String.
-
getContentAsString
String getContentAsString(String encoding)
Gets the content as a String using the specified
encoding.
-
getContentAsJsonObject
JsonObject getContentAsJsonObject()
Gets the content as a JsonObject. This expects
the content to be a valid Json string or an exception
is thrown.
-
getContentAsByteArray
byte[] getContentAsByteArray()
Get the content as byte[]
.
Copyright © 2019. All rights reserved.