Standard Nexus Tool that makes HTTP requests with support for various authentication methods, body types, and response validation.
method: [HttpMethod]
The HTTP method to use for the request.
GET- Retrieve data from the serverPOST- Send data to the serverPUT- Update existing data on the serverDELETE- Remove data from the serverPATCH- Partially update data on the serverHEAD- Retrieve only headers from the serverOPTIONS- Get allowed methods for a resource
url: [UrlInput]
The URL for the request. Can be provided in two formats:
- Full URL:
"https://api.example.com/users" - Split URL:
{ "base_url": "https://api.example.com", "path": "/users" }
opt headers: [Option<HashMap<String, String>>] default: [None]
Custom HTTP headers to include in the request.
opt query: [Option<HashMap<String, String>>] default: [None]
Query parameters to append to the URL.
opt auth: [Option<AuthConfig>] default: [None]
Authentication configuration for the request.
None- No authenticationBearerToken { token }- Bearer token authenticationApiKeyHeader { key, header_name }- API key in header (default: "X-API-Key")ApiKeyQuery { key, param_name }- API key in query parameter (default: "api_key")BasicAuth { username, password }- Basic authentication
opt body: [Option<RequestBody>] default: [None]
Request body configuration.
Json { data }- JSON request bodyForm { data }- URL-encoded form dataMultipart { fields }- Multipart form data for text fieldsRaw { data, content_type }- Raw bytes (base64 encoded)
name: [String] - Field namevalue: [String] - Field value (text only)content_type: [Option<String>] - Content type for the field
opt expect_json: [Option<bool>] default: [None]
Whether to expect a JSON response. If true, attempts to parse the response as JSON.
opt json_schema: [Option<HttpJsonSchema>] default: [None]
Optional JSON schema to validate the response against.
name: [String] - The name of the schemaschema: [schemars::Schema] - The JSON schema for validationdescription: [Option<String>] - Description of the expected formatstrict: [Option<bool>] - Whether to enable strict schema adherence
opt timeout_ms: [Option<u64>] default: [5000]
Request timeout in milliseconds. Maximum allowed value is 30000ms (30 seconds). The timeout applies to the entire request chain, including all redirects when follow_redirects is enabled. For example, if timeout_ms: 5000 is set and a request follows 3 redirects
opt retries: [Option<u32>] default: [0]
Number of retries on failure. Maximum allowed value is 5.
opt follow_redirects: [Option<bool>] default: [false]
Whether to follow HTTP redirects. Defaults to false, following curl's philosophy of not following redirects unless explicitly requested. When enabled, follows up to 3 redirects maximum
Localhost Blocking: Requests to localhost and 127.0.0.1 are blocked for security reasons. This prevents internal network scanning and ensures the tool only makes external requests.
ok
The HTTP request was successful.
{
"type": "ok",
"status": 200,
"headers": {...},
"raw_base64": "...",
"text": "...",
"json": {...},
"schema_validation": {...}
}type: ["ok"] - Response type identifierstatus: [u16] - HTTP status codeheaders: [HashMap<String, String>] - Response headersraw_base64: [String] - Raw response body (base64 encoded)text: [Option<String>] - Text representation (if UTF-8 decodable)json: [Option<Value>] - JSON data (if parseable)schema_validation: [Option<SchemaValidationDetails>] - Schema validation details (if validation was performed)
name: [String] - Name of the schema that was useddescription: [Option<String>] - Description of the schemastrict: [Option<bool>] - Whether strict mode was enabledvalid: [bool] - Validation resulterrors: [Vec<String>] - Validation errors (if any)
err
An error occurred during the request.
{
"type": "err",
"reason": "HTTP error 404: Not Found",
"kind": "err_http",
"status_code": 404
}type: ["err"] - Response type identifierreason: [String] - Detailed error messagekind: [HttpErrorKind] - Type of errorstatus_code: [Option<u16>] - HTTP status code if available
err_http- HTTP error response (4xx, 5xx)err_json_parse- JSON parsing errorerr_schema_validation- Schema validation errorerr_network- Network connectivity errorerr_timeout- Request timeout errorerr_input- Input validation errorerr_url_parse- URL parsing errorerr_base64_decode- Base64 decoding error