http

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignParamsToURL

func AssignParamsToURL(templateURL string, body *wrap.JsonValue) (*url.URL, error)

func ParseHeader added in v0.0.4

func ParseHeader(header string) (string, string, error)

Types

type Method

type Method string
const (
	MethodGet     Method = http.MethodGet
	MethodHead    Method = http.MethodHead
	MethodPost    Method = http.MethodPost
	MethodPut     Method = http.MethodPut
	MethodPatch   Method = http.MethodPatch
	MethodDelete  Method = http.MethodDelete
	MethodConnect Method = http.MethodConnect
	MethodOptions Method = http.MethodOptions
	MethodTrace   Method = http.MethodTrace
)

type Request

type Request struct {
	Header map[string][]string
	Body   *wrap.JsonValue
}

func (*Request) ToHTTPRequest

func (r *Request) ToHTTPRequest(endpointURL string, method Method) (*nethttp.Request, error)

type Response

type Response struct {
	Header map[string][]string
	Body   *wrap.JsonValue
	Code   int
}

func NewResponse

func NewResponse() *Response

Jump to

Keyboard shortcuts

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