Package | mx.rpc.http.mxml |
Class | public class HTTPService |
Inheritance | HTTPService ![]() ![]() ![]() |
Implements | IMXMLSupport, IMXMLObject |
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
<mx:HTTPService>
tag to represent an
HTTPService object in an MXML file. When you call the HTTPService object's
send()
method, it makes an HTTP request to the
specified URL, and an HTTP response is returned. Optionally, you can pass
parameters to the specified URL. 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: Due to a software limitation, HTTPService does not generate user-friendly error messages when using GET.
MXML SyntaxThe <mx:HTTPService> tag accepts the following tag attributes:
<mx:HTTPService Properties concurrency="multiple|single|last" contentType="application/x-www-form-urlencoded|application/xml" destination="DefaultHTTP" id="No default." method="GET|POST|HEAD|OPTIONS|PUT|TRACE|DELETE" resultFormat="object|array|xml|e4x|flashvars|text" showBusyCursor="false|true" makeObjectsBindable="false|true" url="No default." useProxy="false|true" xmlEncode="No default." xmlDecode="No default." Events fault="No default." result="No default." />The
<mx:HTTPService>
tag can have a single <mx:request> tag under which the parameters can be specified.
See also
Method | Defined By | ||
---|---|---|---|
HTTPService(rootURL:String = null, destination:String = null)
Creates a new HTTPService. | HTTPService | ||
![]() | cancel(id:String = null):AsyncToken [override]
Cancels the last service invocation or an invokation with the specified ID. | HTTPService | |
![]() | clearResult(fireBindingEvent:Boolean = true):void [override]
Sets the result property of the invoker to null. | HTTPService | |
![]() | disconnect():void
Disconnects the service's network connection. | HTTPService | |
initialized(document:Object, id:String):void
Called after the implementing object has been created and all
component properties specified on the MXML tag have been
initialized. | HTTPService | ||
![]() | logout():void
Logs the user out of the destination. | HTTPService | |
![]() | send(parameters:Object = null):AsyncToken
Executes an HTTPService request. | HTTPService | |
![]() | setCredentials(username:String, password:String, charset:String = null):void
Sets the credentials for the destination accessed by the service. | HTTPService | |
![]() | setRemoteCredentials(remoteUsername:String, remotePassword:String, charset:String = null):void
The username and password to authenticate a user when accessing
the HTTP URL. | HTTPService | |
![]() | setResult(result:Object):void
This hook is exposed to update the lastResult property. | AbstractInvoker |
HTTPService | () | Constructor |
public function HTTPService(rootURL:String = null, destination:String = null)
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
Creates a new HTTPService. This constructor is usually called by the generated code of an MXML document. You usually use the mx.rpc.http.HTTPService class to create an HTTPService in ActionScript.
ParametersrootURL:String (default = null ) — The URL the HTTPService should use when computing relative URLS.
| |
destination:String (default = null ) — An HTTPService destination name in the service-config.xml file.
|
initialized | () | method |
public function initialized(document:Object, id:String):void
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
Called after the implementing object has been created and all
component properties specified on the MXML tag have been
initialized.
If you create this class in ActionScript and want it to function with validation, you must
call this method and pass in the MXML document and the
HTTPService's id
.
Parameters
document:Object — The MXML document that created this object.
| |
id:String — The identifier used by document to refer
to this object. If the object is a deep property on document,
id is null.
|