Difference between revisions of "UrlLoader:load"

From GiderosMobile
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
<languages />
 
'''<translate>Available since</translate>:''' Gideros 2012.2.2<br/>
 
'''<translate>Available since</translate>:''' Gideros 2012.2.2<br/>
 +
'''<translate>Class</translate>:''' [[Special:MyLanguage/UrlLoader|UrlLoader]]<br/>
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
 
<translate><br />
 
<translate><br />
 
Loads data from the specified URL. If there is any load operation in progress, it is terminated and new progress starts.<br />
 
Loads data from the specified URL. If there is any load operation in progress, it is terminated and new progress starts.<br />
Please refer to [[UrlLoader.new]] for more detailed description of [[Special:MyLanguage/url|url]], [[Special:MyLanguage/method|method]] and [[Special:MyLanguage/body|body]] parameters.<br />
+
Please refer to [[UrlLoader.new]] for more detailed description of ''url'', ''method'' and ''body'' parameters.<br />
 
<br /></translate>
 
<br /></translate>
 
<source lang="lua">
 
<source lang="lua">
Line 14: Line 16:
 
'''headers''': (table, optional) <translate>HTTP headers.</translate> <br/>
 
'''headers''': (table, optional) <translate>HTTP headers.</translate> <br/>
 
'''body''': (string, optional) <translate>HTTP body data. This data is sent as the message body of a request.</translate> <br/>
 
'''body''': (string, optional) <translate>HTTP body data. This data is sent as the message body of a request.</translate> <br/>
 +
 +
{{UrlLoader}}

Revision as of 02:50, 4 December 2019


Available since: Gideros 2012.2.2
Class: UrlLoader

Description


Loads data from the specified URL. If there is any load operation in progress, it is terminated and new progress starts.
Please refer to UrlLoader.new for more detailed description of url, method and body parameters.

 UrlLoader:load(url,method,headers,body)

Parameters

url: (string, optional) URL to download. This parameter is optional and if specified loading starts immediately.
method: (string, default = "get") HTTP request method.
headers: (table, optional) HTTP headers.
body: (string, optional) HTTP body data. This data is sent as the message body of a request.