HTTPie · Schema

HTTPie Request

Schema representing an HTTPie HTTP request, including method, URL, headers, and body.

API ClientAPI TestingCLIClientCommand LineDeveloper ToolsHTTPOpen SourceSessions

Properties

Name Type Description
method string The HTTP method for the request.
url string The target URL for the request.
headers object HTTP headers to include in the request.
queryParams object Query string parameters appended to the URL.
body object The request body payload.
auth object Authentication credentials for the request.
timeout number Request timeout in seconds.
verify boolean Whether to verify SSL certificates.
View JSON Schema on GitHub

JSON Schema

request.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/httpie/refs/heads/main/json-schema/request.json",
  "title": "HTTPie Request",
  "description": "Schema representing an HTTPie HTTP request, including method, URL, headers, and body.",
  "type": "object",
  "properties": {
    "method": {
      "type": "string",
      "description": "The HTTP method for the request.",
      "enum": ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "The target URL for the request."
    },
    "headers": {
      "type": "object",
      "description": "HTTP headers to include in the request.",
      "additionalProperties": {
        "type": "string"
      }
    },
    "queryParams": {
      "type": "object",
      "description": "Query string parameters appended to the URL.",
      "additionalProperties": {
        "type": "string"
      }
    },
    "body": {
      "description": "The request body payload.",
      "oneOf": [
        { "type": "string" },
        { "type": "object" }
      ]
    },
    "auth": {
      "type": "object",
      "description": "Authentication credentials for the request.",
      "properties": {
        "type": {
          "type": "string",
          "description": "The authentication type.",
          "enum": ["basic", "bearer", "digest"]
        },
        "username": {
          "type": "string",
          "description": "Username for basic or digest authentication."
        },
        "password": {
          "type": "string",
          "description": "Password for basic or digest authentication."
        },
        "token": {
          "type": "string",
          "description": "Token for bearer authentication."
        }
      },
      "required": ["type"]
    },
    "timeout": {
      "type": "number",
      "description": "Request timeout in seconds."
    },
    "verify": {
      "type": "boolean",
      "description": "Whether to verify SSL certificates.",
      "default": true
    }
  },
  "required": ["method", "url"]
}