- containsAttribute
bool containsAttribute(string key)
@param key The key of the attribute we are looking for in the connection
@return <tt>true</tt> if this connection contains the attribute with
the specified <tt>key</tt>.
- getAttachment
deprecated Object getAttachment()
Undocumented in source. Be warned that the author may not have intended to support it.
- getAttribute
Object getAttribute(string key)
Returns the value of the user-defined attribute of this connection.
- getAttribute
Object getAttribute(string key, Object defaultValue)
Returns the value of user defined attribute associated with the
specified key. If there's no such attribute, the specified default
value is associated with the specified key, and the default value is
returned. This method is same with the following code except that the
operation is performed atomically.
<pre>
if (containsAttribute(key)) {
return getAttribute(key);
} else {
setAttribute(key, defaultValue);
return defaultValue;
}
</pre>
- getAttributeKeys
string[] getAttributeKeys()
@return the set of keys of all user-defined attributes.
- getMethod
string getMethod()
- getURI
HttpURI getURI()
- getURIString
string getURIString()
@return the HTTP URI in string form
- headerExists
bool headerExists(HttpHeader header)
Undocumented in source. Be warned that the author may not have intended to support it.
- headerExists
bool headerExists(string key)
Undocumented in source. Be warned that the author may not have intended to support it.
- isChunked
bool isChunked()
Undocumented in source. Be warned that the author may not have intended to support it.
- isHttps
bool isHttps()
Checks whether the request is secure or not.
- isRequest
bool isRequest()
Undocumented in source. Be warned that the author may not have intended to support it.
- recycle
void recycle()
Undocumented in source. Be warned that the author may not have intended to support it.
- removeAttribute
Object removeAttribute(string key)
Removes a user-defined attribute with the specified key.
- setAttachment
deprecated void setAttachment(Object attachment)
Undocumented in source. Be warned that the author may not have intended to support it.
- setAttribute
Object setAttribute(string key, Object value)
Sets a user-defined attribute.
- setMethod
void setMethod(string method)
@param method the HTTP method to set
- setURI
void setURI(HttpURI uri)
@param uri the HTTP URI to set
- toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
- ConntentTypeHeader
enum string ConntentTypeHeader;
Undocumented in source.
- ConntentLengthHeader
enum string ConntentLengthHeader;
Undocumented in source.
- _contentType
string _contentType;
Undocumented in source.
- recycle
void recycle()
Undocumented in source. Be warned that the author may not have intended to support it.
- isRequest
bool isRequest()
Undocumented in source. Be warned that the author may not have intended to support it.
- isResponse
bool isResponse()
Undocumented in source. Be warned that the author may not have intended to support it.
- haveBody
bool haveBody()
Undocumented in source. Be warned that the author may not have intended to support it.
- getHttpVersion
HttpVersion getHttpVersion()
@return the HTTP version of this HttpMetaData object
- setHttpVersion
void setHttpVersion(HttpVersion httpVersion)
@param httpVersion the HTTP version to set
- getFields
HttpFields getFields()
@return the HTTP fields of this HttpMetaData object
- getTrailerSupplier
Supplier!HttpFields getTrailerSupplier()
Undocumented in source. Be warned that the author may not have intended to support it.
- setTrailerSupplier
void setTrailerSupplier(Supplier!HttpFields trailers)
Undocumented in source. Be warned that the author may not have intended to support it.
- getBody
HttpBody getBody()
Returns a non-null value if this response was passed to {@link Callback#onResponse} or returned
from {@link Call#execute()}. Response bodies must be {@linkplain ResponseBody closed} and may
be consumed only once.
- setBody
HttpMetaData setBody(HttpBody b)
Undocumented in source. Be warned that the author may not have intended to support it.
- getContentLength
long getContentLength()
@return the content length if available, otherwise {@link Long#MIN_VALUE}
- getContentType
string getContentType()
Undocumented in source. Be warned that the author may not have intended to support it.
- headers
string[] headers(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
- headers
string[] headers(HttpHeader header)
Undocumented in source. Be warned that the author may not have intended to support it.
- header
string header(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
- header
string header(HttpHeader h)
Undocumented in source. Be warned that the author may not have intended to support it.
- headers
HttpFields headers()
Undocumented in source. Be warned that the author may not have intended to support it.
- iterator
InputRange!HttpField iterator()
@return an iterator over the HTTP fields
@see #getFields()
- opApply
int opApply(int delegate(ref HttpField) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
- toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
- withBody
alias withBody = setBody
Undocumented in source.