http

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 4 Imported by: ? 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.

README

http

Documentation

Index

Constants

View Source
const (
	MethodPost = fasthttp.MethodPost
	MethodGet  = fasthttp.MethodGet
	MethodPut  = fasthttp.MethodPut
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

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

func Prepare

func Prepare() *Request

func (*Request) Get

func (r *Request) Get(url string) *Response

func (*Request) Post

func (r *Request) Post(url string, body []byte) *Response

func (*Request) Put

func (r *Request) Put(url string, body []byte) *Response

func (*Request) SetHeader

func (r *Request) SetHeader(key, val string)

func (*Request) SetQuery

func (r *Request) SetQuery(key, val string)

func (*Request) SetQueryInt

func (r *Request) SetQueryInt(key string, val int)

type Response

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

func Get

func Get(url string) *Response

func Post

func Post(url string, body []byte) *Response

func Put

func Put(url string, body []byte) *Response

func (*Response) Body

func (r *Response) Body() []byte

func (*Response) Error

func (r *Response) Error() string

func (*Response) IsError

func (r *Response) IsError() bool

func (*Response) RawError

func (r *Response) RawError() error

func (*Response) StatusCode

func (r *Response) StatusCode() int

Jump to

Keyboard shortcuts

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