request

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2025 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(url string, headers *Headers) (json.RawMessage, error)

Get sends an HTTP GET request to the specified URL. Applies headers and returns the response body as json.RawMessage. Returns an error if the request or response processing fails.

func Post

func Post(url string, body any, headers *Headers) (json.RawMessage, error)

Post sends an HTTP POST request with a JSON body to the specified URL. Applies headers and returns the response body as json.RawMessage. Returns an error if the request or response processing fails.

Types

type Headers

type Headers map[string]string

Headers type alias for map[string]string to store HTTP headers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL