HTTP Server

http.server.api_enabled

Abbreviation ht s a
Accessget/set

Description

Enable the HTTP Server RESTful API. See Networking and Security, HTTP Server RESTful API.

The API is enabled by default, so enabling the HTTP server with http.server.enabled also allows access to the API. To disable HTTP RESTful API calls when the HTTP server is running, set http.server.api_enabled to 0.

Arguments

<0/1>

Default

1

Properties

Supported Platforms

Get example

> get http.server.api_enabled
1

Set example

> set ht s a 0
Set OK

http.server.cors_origin

Abbreviation ht s c
Accessget/set

Description

Specifies origins for which the web browser same-origin policy is relaxed.

If <origin> is set to an empty string, then CORS is completely disabled.

For requests without credentials, a value of * acts as a wildcard, allowing any origin to access the resource.

See HTTP Server RESTful API, CORS.

Arguments

<origin>

Default

"" (empty string). To set the http.server.cors_origin variable to the empty string, supply an argument with two double quotes: ""

Properties

Supported Platforms

Get example

> get http.server.cors_origin

Set example

> set ht s c *
Set OK

http.server.enabled

Abbreviation ht s e
Accessget/set

Description

Enable the HTTP server. See Networking and Security, HTTP Server RESTful API.

Arguments

<1/0>

Default

0

Properties

Supported Platforms

Get example

> get ht s e
0

Set example

> set ht s e 1
Set OK

http.server.interface

Abbreviation ht s i
Accessget/set

Description

Specifies the network interface used by the HTTP server. See Networking and Security, HTTP Server RESTful API.

Arguments

<default/softap/wlan>

Default

default

Properties

Supported Platforms

Get example

> get http.server.interface
default

Set example

> set ht s i wlan
Set OK

http.server.max_clients

Abbreviation ht s m
Accessget/set

Description

Specifies the maximum number of clients the HTTP server allows to connect.

Restricting connected clients may be necessary to limit memory usage. See Memory.

Arguments

<clients>

Default

3 Range: 1 - 8

Properties

Supported Platforms

Get example

> get http.server.max_clients
3

Set example

> set ht s m 1
Set OK

http.server.port

Abbreviation ht s p
Accessget/set

Description

Set the port on which the HTTP server listens. See Networking and Security, HTTP Server RESTful API.

Arguments

<listening port>

Default

80

Properties

Supported Platforms

Get example

> get ht s p
80

Set example

> set http.server.port 8080
Set OK

http.server.root_filename

Abbreviation ht s r
Accessget/set

Description

This sets or gets the root file of the HTTP server. If a plain request to http:// is issued, with no url specified, this file is returned.

See Networking and Security, HTTP Server RESTful API.

Arguments

<filename>

Default

/setup/index.html

Properties

Supported Platforms

Get example

> get ht s r
/setup/index.html

Set example

> set http.server.root_filename /setup/home.html
Set OK