Difference between revisions of "NetworkRequest"
From Lianjapedia
Barrymavin (Talk | contribs) m |
Yvonne.milne (Talk | contribs) |
||
| Line 64: | Line 64: | ||
|- | |- | ||
|valign="top"|Postdata | |valign="top"|Postdata | ||
| − | |valign="top"|url as Character, data as Character | + | |valign="top"|url as Character, data as Character [, filename as Character |
| − | |valign="top"|Sends the specified data to the url using an HTTP POST request | + | |valign="top"|Sends the specified data to the url using an HTTP POST request. If the optional filename is specified, the response is written to the file. |
|- | |- | ||
|valign="top"|Postfile | |valign="top"|Postfile | ||
|valign="top"|url as Character, filename as Character | |valign="top"|url as Character, filename as Character | ||
| − | |valign="top"|Sends the contents of the file | + | |valign="top"|Sends the contents of the file filename to the specified url using an HTTP POST request |
|- | |- | ||
|valign="top"|Putdata | |valign="top"|Putdata | ||
| Line 77: | Line 77: | ||
|valign="top"|Putfile | |valign="top"|Putfile | ||
|valign="top"|url as Character, filename as Character | |valign="top"|url as Character, filename as Character | ||
| − | |valign="top"|Sends the contents of the file | + | |valign="top"|Sends the contents of the file filename to the specified url using an HTTP PUT request |
|- | |- | ||
|valign="top"|Delete | |valign="top"|Delete | ||
Revision as of 12:10, 6 March 2014
Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.
Properties
This class supports the following properties:
| Property | Access (R/RW) | Value | Description |
|---|---|---|---|
| Async | W | Boolean | Whether operation is performed asynchronously (default false) |
| ErrorNumber | R | Numeric | Number of last error |
| ErrorString | R | Character | Message for last error |
| Password | W | Character | Password for remote server |
| Username | W | Character | User name for remote server |
Methods
This class supports the following methods:
| Method | Args | Description |
|---|---|---|
| Getdata | url as Character | Returns the requested data as a Character string |
| Getfile | url as Character, filename as Character | Fetches the data from the specified url into the local file filename using an HTTP GET |
| Isfinished | None | Returns true if asynchronous operation has finished, otherwise false |
| Networkaccessible | None | Returns true if valid network connection |
| Postdata | url as Character, data as Character [, filename as Character | Sends the specified data to the url using an HTTP POST request. If the optional filename is specified, the response is written to the file. |
| Postfile | url as Character, filename as Character | Sends the contents of the file filename to the specified url using an HTTP POST request |
| Putdata | url as Character, data as Character | Sends the specified data to the url using an HTTP PUT request |
| Putfile | url as Character, filename as Character | Sends the contents of the file filename to the specified url using an HTTP PUT request |
| Delete | url as Character | Sends a HTTP DELETE request to the specified url |
| Reset | None | Resets the NetworkRequest object |
| Setheader | name as Character, value as Character | Adds a header name/value pair to the HTTP headers that will be sent with the request |
Events
This class supports the following events:
| Event | Args | Description |
|---|