HTTP Server#

Functions#

int32_t
rsi_webpage_load(uint8_t flags, uint8_t *file_name, uint8_t *webpage, uint32_t length)

Load the webpage to the HTTP Server's file system that is present in the module. This is a blocking API.

int32_t
rsi_json_object_create(uint8_t flags, const char *file_name, uint8_t *json_object, uint32_t length)

Create the JSON object to the webpage that is already present in the module's HTTP server file system. This is a blocking API.

int32_t
rsi_webpage_erase(uint8_t *file_name)

Erase the webpage from HTTP server's file system that is present in the module. This is a blocking API.

int32_t
rsi_json_object_delete(uint8_t *file_name)

Delete the JSON object of the HTTP server's file system that is already present in the module. This is a blocking API.

int32_t
rsi_webpage_send(uint8_t flags, uint8_t *webpage, uint32_t length)

Send the webpage to HTTP server's file system. This is a blocking API.

Function Documentation#

rsi_webpage_load#

int32_t rsi_webpage_load (uint8_t flags, uint8_t * file_name, uint8_t * webpage, uint32_t length)

Load the webpage to the HTTP Server's file system that is present in the module. This is a blocking API.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]flags

- BIT [2] is used to set the webpage that is associated with JSON object

uint8_t *[in]file_name

- Filename of the HTML webpage

uint8_t *[in]webpage

- Pointer to the HTML webpage that contains the HTML webpage content

uint32_t[in]length

- Webpage length

Returns

  • 0 - Success

  • Negative Value - Failure (Possible Error Codes - 0xfffffffc)

Note


rsi_json_object_create#

int32_t rsi_json_object_create (uint8_t flags, const char * file_name, uint8_t * json_object, uint32_t length)

Create the JSON object to the webpage that is already present in the module's HTTP server file system. This is a blocking API.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]flags

- Reserved

const char *[in]file_name

- Filename of the JSON object data

uint8_t *[in]json_object

- Pointer to the JSON object data

uint32_t[in]length

- Length of the JSON object data

Returns

  • 0 - Success

  • Negative Value - Failure (Possible Error Codes - 0xfffffffc)

Note


rsi_webpage_erase#

int32_t rsi_webpage_erase (uint8_t * file_name)

Erase the webpage from HTTP server's file system that is present in the module. This is a blocking API.

Parameters
TypeDirectionArgument NameDescription
uint8_t *[in]file_name

- Erase particular/all loaded webpage files from the HTTP server's file system.
file_name - Erase a particular webpage file.
NULL - Erase all loaded webpage files

Returns

  • 0 - Success

  • Negative Value - Failure (Possible Error Codes - 0xfffffffc)

Note


rsi_json_object_delete#

int32_t rsi_json_object_delete (uint8_t * file_name)

Delete the JSON object of the HTTP server's file system that is already present in the module. This is a blocking API.

Parameters
TypeDirectionArgument NameDescription
uint8_t *[in]file_name

- Delete a particular JSON object that is already created in the HTTP server's file system

Returns

  • 0 - Success

  • Negative Value - Failure (Possible Error Codes - 0xfffffffc)

Note


rsi_webpage_send#

int32_t rsi_webpage_send (uint8_t flags, uint8_t * webpage, uint32_t length)

Send the webpage to HTTP server's file system. This is a blocking API.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]flags

- Reserved

uint8_t *[in]webpage

- Pointer to the HTML webpage that contains the HTML webpage content

uint32_t[in]length

- Webpage length

Returns

  • 0 - Success

  • Negative Value - Failure (Possible Error Codes - 0xfffffffc)

Note