http_lib

package
v0.0.0-...-6f40e4d Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(url string, body []byte, headers map[string]string) (*http.Response, error)

func Get

func Get(url string, body []byte, headers map[string]string) (*http.Response, error)

func HttpRequest

func HttpRequest(url string, body []byte, headers map[string]string, method string) (*http.Response, error)

to avoid duplication in other functions

func Patch

func Patch(url string, body []byte, headers map[string]string) (*http.Response, error)

func Post

func Post(url string, body []byte, headers map[string]string) (*http.Response, error)

func Put

func Put(url string, body []byte, headers map[string]string) (*http.Response, error)

Types

type ErrorString

type ErrorString struct {
	Reason string
	Code   int
}

errorString is a trivial implementation of error.

func (*ErrorString) Error

func (e *ErrorString) Error() string

Jump to

Keyboard shortcuts

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