Package | mx.rpc.http |
Class | public dynamic class HTTPMultiService |
Inheritance | HTTPMultiService ![]() ![]() |
Subclasses | HTTPMultiService |
Language Version: | ActionScript 3.0 |
Product Version: | Flex 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
<mx:HTTPMultiService>
tag to represent a
collection of http operations. Each one has a URL, method, parameters and
return type.
You can set attributes such as the URL and method on the
HTTPMultiService tag to act as defaults for values set on each individual
operation tag. The URL of the HTTPMultiService serves as the base url (meaning the prefix)
for any relative urls set on the http operation tags.
Each http operation has a send()
method, which makes an HTTP request to the
specified URL, and an HTTP response is returned.
You can pass parameters to the specified URL which are used to put data into the HTTP request. The contentType property specifies a mime-type which is used to determine the over-the-wire data format (such as HTTP form encoding or XML).
You can also use a serialization filter to
implement a custom resultFormat such as JSON.
When you do not go through the server-based
proxy service, you can use only HTTP GET or POST methods. However, when you set
the useProxy
property to true and you use the server-based proxy service, you
can also use the HTTP HEAD, OPTIONS, TRACE, and DELETE methods.
Note: Unlike the HTTPService class, the HTTPMultiService class does not
define a request
property.
Note: Due to a software limitation, like HTTPService, the HTTPMultiService does not generate user-friendly error messages when using GET and not using a proxy.
Default MXML PropertyoperationList
Related API Elements
Property | Defined By | ||
---|---|---|---|
contentType : String = "application/x-www-form-urlencoded"
Type of content for service requests. | HTTPMultiService | ||
serializationFilter : SerializationFilter Default serializationFilter used by all operations which do not set one explicitly | HTTPMultiService |
contentType | property |
public var contentType:String = "application/x-www-form-urlencoded"
Type of content for service requests.
The default is application/x-www-form-urlencoded
which sends requests
like a normal HTTP POST with name-value pairs. application/xml
send
requests as XML.
serializationFilter | property |
public var serializationFilter:SerializationFilter
Default serializationFilter used by all operations which do not set one explicitly
Wed Nov 21 2018, 06:34 AM -08:00