Skip to main content
The HTTP provider allows you to query any HTTP endpoint that returns JSON data for verification metrics.

Configuration

Properties

provider.type
string
required
Must be "http".
provider.url
string
required
HTTP endpoint URL. Supports Go templates for dynamic URLs (e.g., http://{{.resource.name}}/health).
provider.method
string
default:"GET"
HTTP method. Options: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS.
provider.headers
object
HTTP headers to include in the request. Values support Go templates (e.g., Authorization: "Bearer {{.variables.token}}").
provider.body
string
Request body for POST/PUT/PATCH requests. Supports Go templates for dynamic content.
provider.timeout
string
default:"30s"
Request timeout duration. Use format like 30s, 1m, 500ms.

Supported HTTP Methods

  • GET (default)
  • POST
  • PUT
  • PATCH
  • DELETE
  • HEAD
  • OPTIONS

Response Data Available in CEL

The HTTP provider makes the following data available in your CEL success conditions:
  • result.ok - true if status code is 2xx
  • result.statusCode - HTTP status code (e.g., 200, 404, 500)
  • result.body - Response body as string
  • result.json - Parsed JSON response (if response is valid JSON)
  • result.headers - Response headers as an object
  • result.duration - Request duration in milliseconds

Example Success Conditions

Examples

Basic Health Check

POST Request with Body

Authenticated Request

Custom Timeout

Template Variables

The HTTP provider supports Go templates in the url, headers, and body fields:

Best Practices

  • Use HTTPS for production endpoints to ensure secure communication
  • Set appropriate timeouts based on your service’s expected response time
  • Handle authentication using deployment variables for sensitive tokens
  • Validate JSON responses by checking result.json exists before accessing fields
  • Use meaningful success conditions that check both status codes and response content