Http object
The Http object sends requests and receives responses from web servers
| Property | Description | Access | Type |
|---|---|---|---|
| Http.content | Get the current received response from the server | readonly | string |
| Http.cookies | Get or set the cookies table for the next HTTP request | readwrite | table |
| Http.headers | Get the headers table for the next HTTP request | readonly | table |
| 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.response | Get the response table from the last HTTP request | readonly | table |
| Methods | Description | Return value |
|---|---|---|
| Http:close() | HTTP connection close | - |
| Http:constructor() | HTTP object constructor | |
| Http:delete() | Send an HTTP DELETE request to the server | |
| Http:download() | Download a file from the server | |
| Http:get() | Send an HTTP GET request to the server | |
| Http:patch() | Send an HTTP PATCH request to the server | |
| Http:post() | Send an HTTP POST request to the server | |
| Http:proxy() | Configure a proxy connection | boolean |
| Http:put() | Send an HTTP PUT request to the server |