Documentation
¶
Overview ¶
Package httpx provides shared HTTP helpers for notify providers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoJSON ¶
func DoJSON(ctx context.Context, client *http.Client, method, url string, headers map[string]string, payload any, maxBody int64) (int, []byte, error)
DoJSON marshals payload as JSON, sends it to url with the given method and headers, and returns the HTTP status code plus up to maxBody bytes of the response body. The remainder of the body is drained so the connection can be reused by the client's transport.
Types ¶
This section is empty.