Http object
Property | Description | Access | Type |
---|---|---|---|
Http.hostname | Get HTTP server hostname | readonly | string |
Http.port | Get HTTP connection port | readonly | number |
Http.received | Get the byte count of data received from the server | readonly | number |
Http.content | Get the current received response from the server | readonly | string |
Http.response | Get the response table from the last HTTP request | readonly | table |
Http.headers | Get the headers table for the next HTTP request | readonly | table |
Http.cookies | Get or set the cookies table for the next HTTP request | readwrite | table |
Method | Description | Return value |
---|---|---|
Http.constructor() | HTTP object constructor | Http |
Http:proxy() | Configure a proxy connection | boolean |
Http:close() | HTTP connection close | - |
Http:get() | Send an HTTP GET request to the server | Task |
Http:download() | Download a file from the server | Task |
Http:post() | Send an HTTP POST request to the server | Task |
Http:put() | Send an HTTP PUT request to the server | Task |
Http:delete() | Send an HTTP DELETE request to the server | Task |