_
Namespace.CONTENT_TYPE_HEADER
{string
}The Content-Type HTTP header name.
_.Error
ClassGeneric error that may occur during a request. … more
.FORM_CONTENT_TYPE
{string
}The Content-Type HTTP header value for a url-encoded form.
_.HttpError
ClassClass for HTTP errors. … more
.Options
Configuration options for an XMLHttpRequest. - headers: map of header key/value pairs. - timeoutMs: number of milliseconds after which the request will be timed out by the client. Default is to allow the browser to handle timeouts. - withCredentials: whether user credentials are to be included in a cross-origin request. See: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#the-withcredentials-attribute - mimeType: allows the caller to override the content-type and charset for the request, which is useful when requesting binary data. See: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#dom-xmlhttprequest-overridemimetype - xssiPrefix: Prefix used for protecting against XSSI attacks, which should be removed before parsing the response as JSON.
.PostData
Defines the types that are allowed as post data.
_.TimeoutError
ClassClass for Timeout errors. … more
.get(url, opt_options)
Sends a get request, returning a transformed result which will be resolved with the response text once the request completes.
url
{string
}
opt_options
{_.Options
=}
Result
}
.getJson(url, opt_options)
Sends a get request, returning a result which will be resolved with the parsed response text once the request completes.
url
{string
}
opt_options
{_.Options
=}
Result
}
.makeRequest(method, url, data, opt_options, opt_callback, opt_errback)
Creates a new XMLHttpRequest and initiates a request.
method
{string
}
url
{string
}
data
{_.PostData
}
opt_options
{_.Options
=}
opt_callback
{function
(XMLHttpRequest
)=}
opt_errback
{function
(Error
)=}
XMLHttpRequest
}
.post(url, data, opt_options)
Sends a post request, returning a transformed result which will be resolved with the response text once the request completes.
url
{string
}
data
{_.PostData
}
opt_options
{_.Options
=}
Result
}
.postJson(url, data, opt_options)
Sends a post request, returning a result which will be resolved with the parsed response text once the request completes.
url
{string
}
data
{_.PostData
}
opt_options
{_.Options
=}
Result
}
.send(method, url, data, opt_options)
Sends a request using XMLHttpRequest and returns a result.
method
{string
}
url
{string
}
data
{_.PostData
}
opt_options
{_.Options
=}
Result
}