HttpRequestOptions

backend.HttpRequestOptions (Typedef)

Low-level HTTP request options used by the backend HTTP implementation.

This typedef defines the core parameters required for making HTTP requests at the backend level. It provides the minimal set of options needed across all platform implementations without any high-level conveniences.

These options are used directly by the platform-specific HTTP implementations and are extended by the higher-level ceramic.HttpRequestOptions for additional functionality like automatic parameter encoding.

All properties except url are optional and have sensible defaults:

  • method defaults to GET
  • headers defaults to empty map
  • content defaults to null (no body)
  • timeout defaults to platform-specific default

Example usage:

var options:HttpRequestOptions = {
    url: "https://api.example.com/data",
    method: POST,
    headers: ["Content-Type" => "application/json"],
    content: '{"key": "value"}',
    timeout: 30
};