Documentation ¶
Overview ¶
Package rest provides useful types and funcitons for working with REST APIs.
TODO(rest): Should this be moved to a REST specification?
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPRequest ¶
type HTTPRequest struct { Method string `json:"method"` Headers http.Header `json:"headers"` Body map[string]any `json:"body"` }
HTTPRequest holds details about a HTTP request. This type is used across all integrations that communicate with an HTTP API for consistency.
type HTTPResponse ¶
type HTTPResponse struct { StatusCode int `json:"status,omitempty"` Headers http.Header `json:"headers,omitempty"` Body map[string]any `json:"body,omitempty"` }
HTTPResponse holds details about a HTTP response. This type is used across all integrations that communicate with an HTTP API for consistency.
Click to show internal directories.
Click to hide internal directories.