Struct stdweb::web::XmlHttpRequest [] [src]

pub struct XmlHttpRequest(_);

Use XmlHttpRequest (XHR) objects to interact with servers. You can retrieve data from a URL without having to do a full page refresh. This enables a Web page to update just part of a page without disrupting what the user is doing. XmlHttpRequest is used heavily in Ajax programming.

(JavaScript docs)

Methods

impl XmlHttpRequest
[src]

[src]

Creates new XmlHttpRequest.

[src]

Returns the current state of the request as a XhrReadyState.

(JavaScript docs)

[src]

Returns a string that contains the response to the request as text, or None if the request was unsuccessful or has not yet been sent.

(JavaScript docs)

[src]

Returns an unsigned short with the status of the response of the request.

(JavaScript docs)

[src]

Open connection with given method (ie GET or POST), and the url to hit.

(JavaScript docs)

[src]

Returns the string containing the text of the specified header. If there are multiple response headers with the same name, then their values are returned as a single concatenated string.

(JavaScript docs)

[src]

Sets the value of an HTTP request header. Must be called after open(), but before send(). If this method is called several times with the same header, the values are merged into one single request header.

(JavaScript docs)

[src]

Send request on an open connection with no data

(JavaScript docs)

[src]

Send request on an open connection with string body

(JavaScript docs)

[src]

Send request on an open connection with a byte array body

(JavaScript docs)

[src]

Aborts the request if it has already been sent. When a request is aborted, its ready_state is changed to Done and the status code is set to Unsent.

(JavaScript docs)

Trait Implementations

impl Clone for XmlHttpRequest
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for XmlHttpRequest
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for XmlHttpRequest
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for XmlHttpRequest
[src]

impl From<XmlHttpRequest> for EventTarget
[src]

[src]

Performs the conversion.

impl TryFrom<EventTarget> for XmlHttpRequest
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl InstanceOf for XmlHttpRequest
[src]

[src]

Checks whenever a given Reference if of type Self.

impl AsRef<Reference> for XmlHttpRequest
[src]

[src]

Performs the conversion.

impl ReferenceType for XmlHttpRequest
[src]

[src]

Converts a given reference into a concrete reference-like wrapper. Doesn't do any type checking; highly unsafe to use! Read more

impl From<XmlHttpRequest> for Reference
[src]

[src]

Performs the conversion.

impl TryFrom<XmlHttpRequest> for Reference
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl TryFrom<Reference> for XmlHttpRequest
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl<'_r> TryFrom<&'_r Reference> for XmlHttpRequest
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl TryFrom<Value> for XmlHttpRequest
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl<'_r> TryFrom<&'_r Value> for XmlHttpRequest
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl JsSerialize for XmlHttpRequest
[src]

impl IEventTarget for XmlHttpRequest
[src]

[src]

Adds given event handler to the list of event listeners for the specified EventTarget on which it's called. Read more

[src]

Dispatches an Event at this EventTarget, invoking the affected event listeners in the appropriate order. Read more

Auto Trait Implementations