Core

HTTP

HTTP client/server helper.

3 nested API groups

Import

from Xenonix.Core import HTTP

Search this API

Filter methods, arguments, and configuration keys on this page.

Configuration

Use Config(...) with these keys where the class exposes configuration.

This object does not expose a public Config table.

Nested APIs

These are public helper types grouped under the main class.

Server

Server API available from the Core library.

Configuration

This object does not expose a public Config table.

Methods

Create

Creates a new Server instance.

Create(Port, IP='')

Arguments

Argument Default Accepted values What it does
Port Required Any valid value Port value used by the operation.
IP '' Any valid value IP value used by the operation.

Output

Creates a new Server object.

Root

Runs the Root operation for Server.

Root(Path)

Arguments

Argument Default Accepted values What it does
Path Required Any valid value File path used for reading or writing.

Output

Returns True/False to indicate success.

CGI

Runs the CGI operation for Server.

CGI(Path)

Arguments

Argument Default Accepted values What it does
Path Required Any valid value File path used for reading or writing.

Output

Returns True/False to indicate success.

CORS

Runs the CORS operation for Server.

CORS(Origin)

Arguments

Argument Default Accepted values What it does
Origin Required Any valid value Origin value used by the operation.

Output

Returns True/False to indicate success.

Cache_Control

Runs the Cache_Control operation for Server.

Cache_Control(Value)

Arguments

Argument Default Accepted values What it does
Value Required Any valid value Value to set or process.

Output

Returns True/False to indicate success.

Timeout

Runs the Timeout operation for Server.

Timeout(Seconds)

Arguments

Argument Default Accepted values What it does
Seconds Required Any valid value Seconds value used by the operation.

Output

Returns True/False to indicate success.

Allowed_Methods

Runs the Allowed_Methods operation for Server.

Allowed_Methods(Methods)

Arguments

Argument Default Accepted values What it does
Methods Required Any valid value Methods value used by the operation.

Output

Returns True/False to indicate success.

Health

Runs the Health operation for Server.

Health(Path)

Arguments

Argument Default Accepted values What it does
Path Required Any valid value File path used for reading or writing.

Output

Returns True/False to indicate success.

Allow_Only_IPs

Runs the Allow_Only_IPs operation for Server.

Allow_Only_IPs(Ips)

Arguments

Argument Default Accepted values What it does
Ips Required Any valid value Ips value used by the operation.

Output

Returns True/False to indicate success.

Enable_TLS

Runs the Enable_TLS operation for Server.

Enable_TLS(Certfile, Keyfile=None)

Arguments

Argument Default Accepted values What it does
Certfile Required Any valid value Certfile value used by the operation.
Keyfile None Any valid value Keyfile value used by the operation.

Output

Returns True/False to indicate success.

Start

Starts the process or connection.

Start()

Arguments

No arguments.

Output

Returns success/status or the operation result.

Close

Applies a morphology-style image operation.

Close()

Arguments

No arguments.

Output

Returns success/status or the operation result.

Client

Client API available from the Core library.

Configuration

This object does not expose a public Config table.

Methods

Create

Creates a new Client instance.

Create(Base_Url=None, Default_Headers=None, Timeout=10)

Arguments

Argument Default Accepted values What it does
Base_Url None Any valid value Base Url value used by the operation.
Default_Headers None Any valid value Default Headers value used by the operation.
Timeout 10 Any valid value Timeout value used by the operation.

Output

Creates a new Client object.

Request

Runs the Request operation for Client.

Request(Method, Url, Params=None, Data=None, Json=None, Headers=None)

Arguments

Argument Default Accepted values What it does
Method Required Any valid value Algorithm/method selector.
Url Required Any valid value Url value used by the operation.
Params None Any valid value Params value used by the operation.
Data None Any valid value Dataset path or dataset definition.
Json None Any valid value Json value used by the operation.
Headers None Any valid value Headers value used by the operation.

Output

Returns structured data such as a list or dictionary.

Text

Runs the Text operation for Client.

Text(Url, Params=None, Headers=None, Encoding=None)

Arguments

Argument Default Accepted values What it does
Url Required Any valid value Url value used by the operation.
Params None Any valid value Params value used by the operation.
Headers None Any valid value Headers value used by the operation.
Encoding None Any valid value Encoding value used by the operation.

Output

Returns the calculated result.

Json

Runs the Json operation for Client.

Json(Url, Params=None, Headers=None)

Arguments

Argument Default Accepted values What it does
Url Required Any valid value Url value used by the operation.
Params None Any valid value Params value used by the operation.
Headers None Any valid value Headers value used by the operation.

Output

Returns the calculated result.

Bytes

Runs the Bytes operation for Client.

Bytes(Url, Params=None, Headers=None)

Arguments

Argument Default Accepted values What it does
Url Required Any valid value Url value used by the operation.
Params None Any valid value Params value used by the operation.
Headers None Any valid value Headers value used by the operation.

Output

Returns the calculated result.

Download

Runs the Download operation for Client.

Download(Url, Path, Params=None, Headers=None, Chunk_Size=65536, Progress_Callback=None)

Arguments

Argument Default Accepted values What it does
Url Required Any valid value Url value used by the operation.
Path Required Any valid value File path used for reading or writing.
Params None Any valid value Params value used by the operation.
Headers None Any valid value Headers value used by the operation.
Chunk_Size 65536 Any valid value Chunk Size value used by the operation.
Progress_Callback None Any valid value Progress Callback value used by the operation.

Output

Returns True/False to indicate success.

Socket

Socket API available from the Core library.

Configuration

This object does not expose a public Config table.

Methods

Create

Creates a new Socket instance.

Create(Port, IP='', Timeout=30)

Arguments

Argument Default Accepted values What it does
Port Required Any valid value Port value used by the operation.
IP '' Any valid value IP value used by the operation.
Timeout 30 Any valid value Timeout value used by the operation.

Output

Creates a new Socket object.

Start

Starts the process or connection.

Start()

Arguments

No arguments.

Output

Returns success/status or the operation result.

Close

Applies a morphology-style image operation.

Close()

Arguments

No arguments.

Output

Returns success/status or the operation result.

Close_Client

Runs the Close_Client operation for Socket.

Close_Client(Client)

Arguments

Argument Default Accepted values What it does
Client Required Any valid value Client value used by the operation.

Output

Runs the operation. Some methods update the object in place.

Receive

Runs the Receive operation for Socket.

Receive(Client=None)

Arguments

Argument Default Accepted values What it does
Client None Any valid value Client value used by the operation.

Output

Returns structured data such as a list or dictionary.

Send

Runs the Send operation for Socket.

Send(Client, Reply)

Arguments

Argument Default Accepted values What it does
Client Required Any valid value Client value used by the operation.
Reply Required Any valid value Reply value used by the operation.

Output

Returns True/False to indicate success.