Paket | mx.rpc.http.mxml |
Sınıf | public class HTTPService |
Miras Alma | HTTPService HTTPService AbstractInvoker EventDispatcher Object |
Uygular | IMXMLSupport, IMXMLObject |
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | 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 SözdizimiMXML Sözdizimini GizleThe <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.
İlgili API Öğeleri
Yöntem | Tanımlayan: | ||
---|---|---|---|
Creates a new HTTPService. | HTTPService | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
EventDispatcher nesnesi olan bir olay dinleyici nesnesini, dinleyicinin bir olayın bildirimini alması için kaydeder. | EventDispatcher | ||
[geçersiz kıl]
Cancels the last service invocation or an invokation with the specified ID. | HTTPService | ||
[geçersiz kıl]
Sets the result property of the invoker to null. | HTTPService | ||
Disconnects the service's network connection. | HTTPService | ||
Olay akışına bir olay gönderir. | EventDispatcher | ||
EventDispatcher nesnesinin belirli bir olay türü için kayıtlı dinleyicisi olup olmadığını kontrol eder. | EventDispatcher | ||
Bir nesnenin belirli bir özelliğinin tanımlı olup olmadığını gösterir. | Object | ||
Called after the implementing object has been created and all
component properties specified on the MXML tag have been
initialized. | HTTPService | ||
Object sınıfının bir örneğinin parametre olarak belirtilen nesnenin prototip zincirinde olup olmadığını gösterir. | Object | ||
Logs the user out of the destination. | HTTPService | ||
Belirtilen özelliğin bulunup bulunmadığını ve numaralandırılabilir olup olmadığını gösterir. | Object | ||
EventDispatcher nesnesinden bir dinleyiciyi kaldırır. | EventDispatcher | ||
Executes an HTTPService request. | HTTPService | ||
Sets the credentials for the destination accessed by the service. | HTTPService | ||
Dinamik bir özelliğin döngü işlemlerinde kullanılabilirliğini ayarlar. | Object | ||
The username and password to authenticate a user when accessing
the HTTP URL. | HTTPService | ||
This hook is exposed to update the lastResult property. | AbstractInvoker | ||
Bu nesnenin, yerel ayara özel kurallara göre biçimlendirilmiş dize temsilini döndürür. | Object | ||
Belirtilen nesnenin dize olarak temsil edilen halini döndürür. | Object | ||
Belirtilen nesnenin temel değerini döndürür. | Object | ||
Bir olay dinleyicisinin bu EventDispatcher nesnesiyle mi, yoksa onun belirtilen olay türüne yönelik üst öğelerinden biriyle mi kayıtlı olduğunu kontrol eder. | EventDispatcher |
HTTPService | () | Yapıcı |
public function HTTPService(rootURL:String = null, destination:String = null)
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | 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.
ParametrelerrootURL: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 | () | yöntem |
public function initialized(document:Object, id:String):void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | 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
.
Parametreler
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.
|
<?xml version="1.0" encoding="utf-8"?> <!-- Simple example to demonstrate the HTTPService tag. --> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="feedRequest.send();"> <!-- The url property specifies the location of the requested file, in this case the RSS 2.0 feed of Matt Chotin's blog. As of this writing, the URL was still valid, but you should check to make sure it hasn't changed. You should use the latest RSS 2.0 URL listed on the right side of the blog at http://www.adobe.com/go/mchotinblog. --> <fx:Declarations> <mx:HTTPService id="feedRequest" url="http://weblogs.macromedia.com/mchotin/index.xml" useProxy="false" /> </fx:Declarations> <mx:Panel title="HTTPService Example" height="75%" width="75%" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10"> <mx:DataGrid id="dgPosts" height="50%" width="75%" dataProvider="{feedRequest.lastResult.rss.channel.item}"> <mx:columns> <mx:DataGridColumn headerText="Posts" dataField="title"/> <mx:DataGridColumn headerText="Date" dataField="pubDate"/> </mx:columns> </mx:DataGrid> <mx:TextArea height="50%" width="75%" htmlText="{dgPosts.selectedItem.description}"/> </mx:Panel> </s:Application>
Tue Jun 12 2018, 01:09 PM Z