³ÉÈË¿ìÊÖ

Please turn on JavaScript. To find out how to do this visit the .

Provided in callbacks to glow.net.post and glow.net.get

Further Info & Examples

Constructor

There is no direct constructor, since glow.net.post and glow.net.get create the instances.

Properties

nativeResponse

The response object from the browser.

Type

Description

This may not have the same properties and methods across user agents.

status

HTTP status code of the response

Type
timedOut

Boolean indicating if the requests time out was reached.

Type
wasSuccessful

Boolean indicating if the request returned successfully.

Type

Methods

header

Gets a header from the response

Synopsis

myResponse.header(name);

Parameters

name
Type

Header name

Returns

Header value

Example

var contentType = myResponse.header("Content-Type");
json

Gets the body of the response as a json object

Synopsis

myResponse.json(safeMode);

Parameters

safeMode
Type
Default
false
Optional
Yes

If true, the response will be parsed using a string parser which will filter out non-JSON javascript, this will be slower but recommended if you do not trust the data source.

Returns

statusText

Gets the meaning of myResponse.status

Synopsis

myResponse.statusText();

Returns

text

Gets the body of the response as plain text

Synopsis

myResponse.text();

Returns

Response as text

xml

Gets the body of the response as xml

Synopsis

myResponse.xml();

Returns

xml

Response as XML

Documentation generated by 2.1.0 on Thu Jul 07 2011 12:47:29 GMT+0100 (BST)

³ÉÈË¿ìÊÖ iD

³ÉÈË¿ìÊÖ navigation

³ÉÈË¿ìÊÖ Â© 2014 The ³ÉÈË¿ìÊÖ is not responsible for the content of external sites. Read more.

This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.