httputilz

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: MIT Imports: 8 Imported by: 12

Documentation

Index

Constants

View Source
const (
	MethodGet     = "GET"     // RFC 7231, 4.3.1
	MethodHead    = "HEAD"    // RFC 7231, 4.3.2
	MethodPost    = "POST"    // RFC 7231, 4.3.3
	MethodPut     = "PUT"     // RFC 7231, 4.3.4
	MethodPatch   = "PATCH"   // RFC 5789
	MethodDelete  = "DELETE"  // RFC 7231, 4.3.5
	MethodConnect = "CONNECT" // RFC 7231, 4.3.6
	MethodOptions = "OPTIONS" // RFC 7231, 4.3.7
	MethodTrace   = "TRACE"   // RFC 7231, 4.3.8
)

HTTP methods were copied from net/http - fasthttp

Variables

This section is empty.

Functions

func AllHTTPMethods added in v1.0.1

func AllHTTPMethods() []string

func DumpRequest

func DumpRequest(req *retryablehttp.Request) (string, error)

DumpRequest to string

func DumpResponse added in v0.0.5

func DumpResponse(resp *http.Response) (string, error)

DumpResponse to string

func ParseRequest added in v1.0.0

func ParseRequest(req string) (method string, path string, headers map[string]string, body string, err error)

ParseRequest from raw string

Types

This section is empty.

Jump to

Keyboard shortcuts

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