rest

package
v0.1.24435 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(host string, config *settings.Config) *Client

func (*Client) DoRequest

func (c *Client) DoRequest(req *http.Request, resp interface{}) (statusCode int, err error)

func (*Client) NewAPIRequest added in v0.1.21843

func (c *Client) NewAPIRequest(method string, u *url.URL, payload interface{}) (req *http.Request, err error)

NewAPIRequest - similar to NewRequest except it uses the apiURL as the base URL.

func (*Client) NewRequest

func (c *Client) NewRequest(method string, u *url.URL, payload interface{}) (req *http.Request, err error)

type HTTPError

type HTTPError struct {
	Code    int
	Message string
}

func (*HTTPError) Error

func (e *HTTPError) Error() string

Jump to

Keyboard shortcuts

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