http

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

View Source
const (
	CONTENT_TYPE             string = "Content-Type"
	AUTHORIZATION            string = "Authorization"
	URL_ENCODED_CONTENT_TYPE string = "application/x-www-form-urlencoded"
	JSON_CONTENT_TYPE        string = "application/json"
	MULTIPART_CONTENT_TYPE   string = "multipart/mixed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRequest

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

func (*BaseRequest) Body

func (req *BaseRequest) Body() io.Reader

func (*BaseRequest) Headers

func (req *BaseRequest) Headers() http.Header

func (*BaseRequest) Method

func (req *BaseRequest) Method() string

func (*BaseRequest) Path

func (req *BaseRequest) Path() string

func (*BaseRequest) Query

func (req *BaseRequest) Query() url.Values

func (*BaseRequest) Send

func (req *BaseRequest) Send() (*http.Response, error)

func (*BaseRequest) SetUrl

func (req *BaseRequest) SetUrl(url string)

func (*BaseRequest) Url

func (req *BaseRequest) Url() string

type Headers

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

func (*Headers) GetHeaders

func (h *Headers) GetHeaders() corehttp.Header

func (*Headers) SetHeader

func (h *Headers) SetHeader(name string, value string)

type Request

type Request interface {
	Method() string
	Path() string
	Query() url.Values
	Url() string
	Body() io.Reader
	Headers() http.Header
	SetUrl(s string)
	Send() (*http.Response, error)
}

type Request2

type Request2 struct {
	Method  string
	Path    string
	Query   url.Values
	URL     string
	Body    io.Reader
	Headers http.Header
}

func NewRequest2

func NewRequest2() Request2

func (*Request2) Send

func (req *Request2) Send() (*http.Response, error)

type RequestInterface

type RequestInterface interface {
}

Jump to

Keyboard shortcuts

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