Apache Flex 4.16.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
HTTPRequestMessage

Package | mx.messaging.messages
Class | public class HTTPRequestMessage
Inheritance | HTTPRequestMessage AbstractMessage Object
Subclasses | SOAPMessage

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

HTTP requests are sent to the HTTP endpoint using this message type. An HTTPRequestMessage encapsulates content and header information normally found in HTTP requests made by a browser.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | body : Object The body of a message contains the specific data that needs to be delivered to the remote destination. | AbstractMessage
|  | clientId : String The clientId indicates which MessageAgent sent the message. | AbstractMessage
|  | contentType : String Indicates the content type of this message. | HTTPRequestMessage
|  | destination : String The message destination. | AbstractMessage
|  | headers : Object The headers of a message are an associative array where the key is the header name and the value is the header value. | AbstractMessage
|  | httpHeaders : Object Contains specific HTTP headers that should be placed on the request made to the destination. | HTTPRequestMessage
|  | messageId : String The unique id for the message. | AbstractMessage
|  | method : String Indicates what method should be used for the request. | HTTPRequestMessage
|  | recordHeaders : Boolean Only used when going through the proxy, should the proxy send back the request and response headers it used. | HTTPRequestMessage
|  | timestamp : Number Provides access to the time stamp for the message. | AbstractMessage
|  | timeToLive : Number The time to live value of a message indicates how long the message should be considered valid and deliverable. | AbstractMessage
|  | url : String Contains the final destination for this request. | HTTPRequestMessage

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | HTTPRequestMessage() Constructs an uninitialized HTTP request. | HTTPRequestMessage
|  | toString():String Returns a string representation of the message. | AbstractMessage

Public Constants
Hide Inherited Public Constants
Show Inherited Public Constants

| Constant | Defined By
--- | --- | ---
|  | CONTENT_TYPE_FORM : String = application/x-www-form-urlencoded [static] Indicates that the content of this message is a form. | HTTPRequestMessage
|  | CONTENT_TYPE_SOAP_XML : String = text/xml; charset=utf-8 [static] Indicates that the content of this message is XML meant for a SOAP request. | HTTPRequestMessage
|  | CONTENT_TYPE_XML : String = application/xml [static] Indicates that the content of this message is XML. | HTTPRequestMessage
|  | DELETE_METHOD : String = DELETE [static] Indicates that the method used for this request should be "delete". | HTTPRequestMessage
|  | DESTINATION_CLIENT_ID_HEADER : String = DSDstClientId [static] Messages pushed from the server may arrive in a batch, with messages in the batch potentially targeted to different Consumer instances. | AbstractMessage
|  | ENDPOINT_HEADER : String = DSEndpoint [static] Messages are tagged with the endpoint id for the Channel they are sent over. | AbstractMessage
|  | FLEX_CLIENT_ID_HEADER : String = DSId [static] This header is used to transport the global FlexClient Id value in outbound messages once it has been assigned by the server. | AbstractMessage
|  | GET_METHOD : String = GET [static] Indicates that the method used for this request should be "get". | HTTPRequestMessage
|  | HEAD_METHOD : String = HEAD [static] Indicates that the method used for this request should be "head". | HTTPRequestMessage
|  | OPTIONS_METHOD : String = OPTIONS [static] Indicates that the method used for this request should be "options". | HTTPRequestMessage
|  | POST_METHOD : String = POST [static] Indicates that the method used for this request should be "post". | HTTPRequestMessage
|  | PRIORITY_HEADER : String = DSPriority [static] Messages sent by a MessageAgent can have a priority header with a 0-9 numerical value (0 being lowest) and the server can choose to use this numerical value to prioritize messages to clients. | AbstractMessage
|  | PUT_METHOD : String = PUT [static] Indicates that the method used for this request should be "put". | HTTPRequestMessage
|  | REMOTE_CREDENTIALS_CHARSET_HEADER : String = DSRemoteCredentialsCharset [static] Messages that need to set remote credentials for a destination may also need to report the character-set encoding that was used to create the credentials String using this header. | AbstractMessage
|  | REMOTE_CREDENTIALS_HEADER : String = DSRemoteCredentials [static] Messages that need to set remote credentials for a destination carry the Base64 encoded credentials in this header. | AbstractMessage
|  | REQUEST_TIMEOUT_HEADER : String = DSRequestTimeout [static] Messages sent with a defined request timeout use this header. | AbstractMessage
|  | STATUS_CODE_HEADER : String = DSStatusCode [static] A status code can provide context about the nature of a response message. | AbstractMessage
|  | TRACE_METHOD : String = TRACE [static] Indicates that the method used for this request should be "trace". | HTTPRequestMessage

Property Detail

contentType | property

`public var contentType:String`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Indicates the content type of this message. This value must be understood by the destination this request is sent to.

The following example sets the `contentType` property:

              var msg:HTTPRequestMessage = new HTTPRequestMessage();
              msg.contentType = HTTPRequestMessage.CONTENT_TYPE_FORM;
              msg.method = HTTPRequestMessage.POST_METHOD;
              msg.url = "http://my.company.com/login";

httpHeaders | property |

`public var httpHeaders:Object`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Contains specific HTTP headers that should be placed on the request made to the destination.

method | property |

`method:String`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Indicates what method should be used for the request. The only values allowed are:

- `HTTPRequestMessage.DELETE_METHOD`
- `HTTPRequestMessage.GET_METHOD`
- `HTTPRequestMessage.HEAD_METHOD`
- `HTTPRequestMessage.POST_METHOD`
- `HTTPRequestMessage.OPTIONS_METHOD`
- `HTTPRequestMessage.PUT_METHOD`
- `HTTPRequestMessage.TRACE_METHOD`

The following example sets the `method` property:

              var msg:HTTPRequestMessage = new HTTPRequestMessage();
              msg.contentType = HTTPRequestMessage.CONTENT_TYPE_FORM;
              msg.method = HTTPRequestMessage.POST_METHOD;
              msg.url = "http://my.company.com/login";

Implementation
`public function get method():String`
`public function set method(value:String):void`

recordHeaders | property |

`public var recordHeaders:Boolean`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Only used when going through the proxy, should the proxy send back the request and response headers it used. Defaults to false. Currently only set when using the NetworkMonitor.

url | property |

`public var url:String`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Contains the final destination for this request. This is the URL that the content of this message, found in the `body` property, will be sent to, using the method specified.

The following example sets the `url` property:

              var msg:HTTPRequestMessage = new HTTPRequestMessage();
              msg.contentType = HTTPRequestMessage.CONTENT_TYPE_FORM;
              msg.method = HTTPRequestMessage.POST_METHOD;
              msg.url = "http://my.company.com/login";

Constructor Detail

HTTPRequestMessage | () | Constructor

`public function HTTPRequestMessage()`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Constructs an uninitialized HTTP request.

Constant Detail

CONTENT_TYPE_FORM | Constant

`public static const CONTENT_TYPE_FORM:String = application/x-www-form-urlencoded`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Indicates that the content of this message is a form.

The following example uses this constant:

              var msg:HTTPRequestMessage = new HTTPRequestMessage();
              msg.contentType = HTTPRequestMessage.CONTENT_TYPE_FORM;
              msg.method = HTTPRequestMessage.POST_METHOD;
              msg.url = "http://my.company.com/login";

CONTENT_TYPE_SOAP_XML | Constant |

`public static const CONTENT_TYPE_SOAP_XML:String = text/xml; charset=utf-8`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Indicates that the content of this message is XML meant for a SOAP request.

The following example uses this constant:

              var msg:HTTPRequestMessage = new HTTPRequestMessage();
              msg.contentType = HTTPRequestMessage.CONTENT_TYPE_SOAP_XML;
              msg.method = HTTPRequestMessage.POST_METHOD;
              msg.url = "http://my.company.com/login";

CONTENT_TYPE_XML | Constant |

`public static const CONTENT_TYPE_XML:String = application/xml`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Indicates that the content of this message is XML.

The following example uses this constant:

              var msg:HTTPRequestMessage = new HTTPRequestMessage();
              msg.contentType = HTTPRequestMessage.CONTENT_TYPE_XML;
              msg.method = HTTPRequestMessage.POST_METHOD;
              msg.url = "http://my.company.com/login";

DELETE_METHOD | Constant |

`public static const DELETE_METHOD:String = DELETE`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Indicates that the method used for this request should be "delete".

The following example uses this constant:

              var msg:HTTPRequestMessage = new HTTPRequestMessage();
              msg.contentType = HTTPRequestMessage.CONTENT_TYPE_FORM;
              msg.method = HTTPRequestMessage.DELETE_METHOD;
              msg.url = "http://my.company.com/login";

GET_METHOD | Constant |

`public static const GET_METHOD:String = GET`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Indicates that the method used for this request should be "get".

The following example uses this constant:

              var msg:HTTPRequestMessage = new HTTPRequestMessage();
              msg.contentType = HTTPRequestMessage.CONTENT_TYPE_FORM;
              msg.method = HTTPRequestMessage.GET_METHOD;
              msg.url = "http://my.company.com/login";

HEAD_METHOD | Constant |

`public static const HEAD_METHOD:String = HEAD`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Indicates that the method used for this request should be "head".

The following example uses this constant:

              var msg:HTTPRequestMessage = new HTTPRequestMessage();
              msg.contentType = HTTPRequestMessage.CONTENT_TYPE_FORM;
              msg.method = HTTPRequestMessage.HEAD_METHOD;
              msg.url = "http://my.company.com/login";

OPTIONS_METHOD | Constant |

`public static const OPTIONS_METHOD:String = OPTIONS`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Indicates that the method used for this request should be "options".

The following example uses this constant:

              var msg:HTTPRequestMessage = new HTTPRequestMessage();
              msg.contentType = HTTPRequestMessage.CONTENT_TYPE_FORM;
              msg.method = HTTPRequestMessage.OPTIONS_METHOD;
              msg.url = "http://my.company.com/login";

POST_METHOD | Constant |

`public static const POST_METHOD:String = POST`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Indicates that the method used for this request should be "post".

The following example uses this constant:

              var msg:HTTPRequestMessage = new HTTPRequestMessage();
              msg.contentType = HTTPRequestMessage.CONTENT_TYPE_FORM;
              msg.method = HTTPRequestMessage.POST_METHOD;
              msg.url = "http://my.company.com/login";

PUT_METHOD | Constant |

`public static const PUT_METHOD:String = PUT`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Indicates that the method used for this request should be "put".

The following example uses this constant:

              var msg:HTTPRequestMessage = new HTTPRequestMessage();
              msg.contentType = HTTPRequestMessage.CONTENT_TYPE_FORM;
              msg.method = HTTPRequestMessage.PUT_METHOD;
              msg.url = "http://my.company.com/login";

TRACE_METHOD | Constant |

`public static const TRACE_METHOD:String = TRACE`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Indicates that the method used for this request should be "trace".

The following example uses this constant:

              var msg:HTTPRequestMessage = new HTTPRequestMessage();
              msg.contentType = HTTPRequestMessage.CONTENT_TYPE_FORM;
              msg.method = HTTPRequestMessage.TRACE_METHOD;
              msg.url = "http://my.company.com/login";

Sun Mar 5 2017, 03:42 PM +11:00