Struct xpcom::interfaces::nsIHttpRequest
[−]
[src]
#[repr(C)]pub struct nsIHttpRequest { /* fields omitted */ }
interface nsIHttpRequest : nsISupports
Methods
impl nsIHttpRequest
[src]
pub fn coerce<T: nsIHttpRequestCoerce>(&self) -> &T
[src]
Cast this nsIHttpRequest
to one of its base interfaces.
impl nsIHttpRequest
[src]
pub unsafe fn GetMethod(&self, aMethod: *mut *const c_char) -> nsresult
[src]
/**
* A representation of the data included in an HTTP request.
*/
/**
* The request type for this request (see RFC 2616, section 5.1.1).
*/
readonly attribute string method;
pub unsafe fn GetScheme(&self, aScheme: *mut *const c_char) -> nsresult
[src]
/**
* The scheme of the requested path, usually 'http' but might possibly be
* 'https' if some form of SSL tunneling is in use. Note that this value
* cannot be accurately determined unless the incoming request used the
* absolute-path form of the request line; it defaults to 'http', so only
* if it is something else can you be entirely certain it's correct.
*/
readonly attribute string scheme;
pub unsafe fn GetHost(&self, aHost: *mut *const c_char) -> nsresult
[src]
/**
* The host of the data being requested (e.g. "localhost" for the
* http://localhost:8080/file resource). Note that the relevant port on the
* host is specified in this.port. This value is in the ASCII character
* encoding.
*/
readonly attribute string host;
pub unsafe fn GetPort(&self, aPort: *mut uint32_t) -> nsresult
[src]
/**
* The port on the server on which the request was received.
*/
readonly attribute unsigned long port;
pub unsafe fn GetPath(&self, aPath: *mut *const c_char) -> nsresult
[src]
/**
* The requested path, without any query string (e.g. "/dir/file.txt"). It is
* guaranteed to begin with a "/". The individual components in this string
* are URL-encoded.
*/
readonly attribute string path;
pub unsafe fn GetQueryString(
&self,
aQueryString: *mut *const c_char
) -> nsresult
[src]
&self,
aQueryString: *mut *const c_char
) -> nsresult
/**
* The URL-encoded query string associated with this request, not including
* the initial "?", or "" if no query string was present.
*/
readonly attribute string queryString;
pub unsafe fn GetHttpVersion(
&self,
aHttpVersion: *mut *const c_char
) -> nsresult
[src]
&self,
aHttpVersion: *mut *const c_char
) -> nsresult
/**
* A string containing the HTTP version of the request (i.e., "1.1"). Leading
* zeros for either component of the version will be omitted. (In other
* words, if the request contains the version "1.01", this attribute will be
* "1.1"; see RFC 2616, section 3.1.)
*/
readonly attribute string httpVersion;
pub unsafe fn GetHeader(
&self,
fieldName: *const c_char,
_retval: *mut *const c_char
) -> nsresult
[src]
&self,
fieldName: *const c_char,
_retval: *mut *const c_char
) -> nsresult
/**
* Returns the value for the header in this request specified by fieldName.
*
* @param fieldName
* the name of the field whose value is to be gotten; note that since HTTP
* header field names are case-insensitive, this method produces equivalent
* results for "HeAdER" and "hEADer" as fieldName
* @returns
* The result is a string containing the individual values of the header,
* usually separated with a comma. The headers WWW-Authenticate,
* Proxy-Authenticate, and Set-Cookie violate the HTTP specification,
* however, and for these headers only the separator string is '\n'.
*
* @throws NS_ERROR_INVALID_ARG
* if fieldName does not constitute a valid header field name
* @throws NS_ERROR_NOT_AVAILABLE
* if the given header does not exist in this
*/
string getHeader (in string fieldName);
pub unsafe fn HasHeader(
&self,
fieldName: *const c_char,
_retval: *mut bool
) -> nsresult
[src]
&self,
fieldName: *const c_char,
_retval: *mut bool
) -> nsresult
/**
* Returns true if a header with the given field name exists in this, false
* otherwise.
*
* @param fieldName
* the field name whose existence is to be determined in this; note that
* since HTTP header field names are case-insensitive, this method produces
* equivalent results for "HeAdER" and "hEADer" as fieldName
* @throws NS_ERROR_INVALID_ARG
* if fieldName does not constitute a valid header field name
*/
boolean hasHeader (in string fieldName);
pub unsafe fn GetHeaders(
&self,
aHeaders: *mut *const nsISimpleEnumerator
) -> nsresult
[src]
&self,
aHeaders: *mut *const nsISimpleEnumerator
) -> nsresult
/**
* An nsISimpleEnumerator of nsISupportsStrings over the names of the headers
* in this request. The header field names in the enumerator may not
* necessarily have the same case as they do in the request itself.
*/
readonly attribute nsISimpleEnumerator headers;
pub unsafe fn GetBodyInputStream(
&self,
aBodyInputStream: *mut *const nsIInputStream
) -> nsresult
[src]
&self,
aBodyInputStream: *mut *const nsIInputStream
) -> nsresult
/**
* A stream from which data appearing in the body of this request can be read.
*/
readonly attribute nsIInputStream bodyInputStream;
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIHttpRequest
[src]
const IID: nsIID
IID: nsIID = nsID(2542596878, 44403, 17134, [143, 34, 254, 10, 175, 27, 245, 210])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsIHttpRequest
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIHttpRequest
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.