This section provides an overview of the Network Configuration API, which allows developers to manage and configure network settings for their applications.

Overview

The Network Configuration API provides a set of endpoints to configure network settings, such as setting up proxy settings, adjusting timeouts, and managing connection retries.

Endpoints

  • /api/network/config - Retrieve the current network configuration.
  • /api/network/config/set - Update the network configuration settings.

Usage

To retrieve the current network configuration, you can make a GET request to /api/network/config. Here's an example of the response:

{
  "proxy": {
    "enabled": true,
    "host": "proxy.example.com",
    "port": 8080
  },
  "timeout": {
    "connect": 5000,
    "read": 10000,
    "write": 10000
  },
  "retries": 3
}

To update the network configuration, you can make a POST request to /api/network/config/set with the new settings. Here's an example of the request body:

{
  "proxy": {
    "enabled": false,
    "host": "custom-proxy.example.com",
    "port": 8081
  },
  "timeout": {
    "connect": 3000,
    "read": 8000,
    "write": 8000
  },
  "retries": 5
}

For more information on how to use the Network Configuration API, please refer to our API Documentation.

Network Configuration Example