Package org.openqa.selenium.remote.http
Class HttpResponse
java.lang.Object
org.openqa.selenium.remote.http.HttpResponse
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String key) Retrieves a user-defined attribute of this message.getHeaders
(String name) int
Returns the host this response was received from, or null if it was not set.boolean
removeAttribute
(String key) removeHeader
(String name) setAttribute
(String key, Object value) setContent
(Supplier<InputStream> supplier) setStatus
(int status) setTargetHost
(String host) Sets the host this response was received from.toString()
-
Field Details
-
HTTP_TARGET_HOST
- See Also:
-
-
Constructor Details
-
HttpResponse
public HttpResponse()
-
-
Method Details
-
isSuccessful
public boolean isSuccessful() -
getStatus
public int getStatus() -
setStatus
-
setTargetHost
Sets the host this response was received from.- Parameters:
host
- originating host
-
getTargetHost
Returns the host this response was received from, or null if it was not set.- Returns:
- originating host
-
toString
-
getAttribute
Retrieves a user-defined attribute of this message. Attributes are stored as simple key-value pairs and are not included in a message's serialized form.- Parameters:
key
- attribute name- Returns:
- attribute object
-
setAttribute
-
removeAttribute
-
getAttributeNames
-
getHeaderNames
-
getHeaders
-
getHeader
-
setHeader
-
addHeader
-
removeHeader
-
getContentEncoding
-
setContent
-
getContent
-