Help us shape the future of Go! Take the 2026 Go Developer Survey

http

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do() *resty.Client

Do returns the client, so it can be used to do requests

Types

type HttpError

type HttpError struct {
	Error            string `json:"error"`
	ErrorDescription string `json:"error_description"`
	Status           int
}

HttpError is a type for returning the server's error response including its status code

func Get

func Get(url string, params url.Values, res any) (*resty.Response, *HttpError, error)

Get performs a http GET request and parses the response into the given interface{}

func Post

func Post(url string, req any, res any) (*resty.Response, *HttpError, error)

Post performs a http POST request and parses the response into the given interface{}

func (*HttpError) Err

func (e *HttpError) Err() error

Err returns an error including the server's error response

Jump to

Keyboard shortcuts

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