httphandler

package
v0.0.0-...-9c64050 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddQuery

func AddQuery(httpRequest *http.Request, queries map[string]string)

func CloseBody

func CloseBody(closer io.ReadCloser)

func CreateGetRequest

func CreateGetRequest(url string) *http.Request

func CreatePostRequest

func CreatePostRequest(url string, data interface{}) *http.Request

func GetRateLimitLimit

func GetRateLimitLimit(httpResponse *http.Response) (rateLimitLimit int)

func GetRateLimitRemaining

func GetRateLimitRemaining(httpResponse *http.Response) (rateLimitRemaining int)

func IsRateLimitResetOK

func IsRateLimitResetOK(httpResponse *http.Response) (bool, int)

func IsResponseOK

func IsResponseOK(httpResponse *http.Response) bool

func MakeRequest

func MakeRequest(httpRequest *http.Request) (httpResponse *http.Response, err error)

Types

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type ErrorResponse

type ErrorResponse struct {
	Errors []Error `json:"errors"`
}

Jump to

Keyboard shortcuts

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