httpclient

package module
v0.0.0-...-74d8a8e Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 9 Imported by: 0

README

httpclient

Documentation

Index

Constants

View Source
const (
	PRAGMA        = "Pragma"
	CACHE_CONTROL = "Cache-Control"
	CONNECTION    = "Connection"
)
View Source
const (
	NO_STORE = "no-store"
	NO_CACHE = "no-cache"
	CLOSE    = "close"
)
View Source
const (
	ACCEPT         = "Accept"
	ACCEPT_CHARSET = "Accept-Charset"
	FROM           = "From"
	REFERER        = "Referer"
	USER_AGENT     = "User-Agent"
	AUTHORIZATION  = "Authorization"
	CONTENT_TYPE   = "Content-Type"
)
View Source
const (
	UTF8                    = "utf-8"
	MIME_TYPE_TEXT          = "text"
	MIME_TYPE_APPLICATION   = "application"
	MIME_SUBTYPE_HTML       = "html"
	MIME_SUBTYPE_JSON       = "json"
	MIME_SUBTYPE_CSV        = "csv"
	MIME_SUBTYPE_PLAIN      = "plain"
	MIME_SUBTYPE_URLENCODED = "x-www-form-urlencoded"
	MIME_SUBTYPE_JS         = "javascript"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GeneralHeader

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

func (*GeneralHeader) CacheControl

func (gh *GeneralHeader) CacheControl() string

func (*GeneralHeader) Connection

func (gh *GeneralHeader) Connection() string

func (*GeneralHeader) Init

func (gh *GeneralHeader) Init()

func (*GeneralHeader) Pragma

func (gh *GeneralHeader) Pragma() string

func (*GeneralHeader) SetCacheControl

func (gh *GeneralHeader) SetCacheControl(cachecontrol string)

func (*GeneralHeader) SetConnection

func (gh *GeneralHeader) SetConnection(connection string)

func (*GeneralHeader) SetPragma

func (gh *GeneralHeader) SetPragma(pragma string)

type HttpGet

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

func (*HttpGet) Duration

func (hget *HttpGet) Duration() time.Duration

func (*HttpGet) Init

func (hget *HttpGet) Init(url string, duration time.Duration, query url.Values)

func (*HttpGet) Request

func (hget *HttpGet) Request(gh GeneralHeader, rqh RequestHeader) ([]byte, error)

func (*HttpGet) SetDuration

func (hget *HttpGet) SetDuration(duration time.Duration)

func (*HttpGet) SetQuery

func (hget *HttpGet) SetQuery(query url.Values)

func (*HttpGet) SetUrl

func (hget *HttpGet) SetUrl(url string)

func (*HttpGet) Status

func (hget *HttpGet) Status() string

func (*HttpGet) StatusCode

func (hget *HttpGet) StatusCode() int

func (*HttpGet) Url

func (hget *HttpGet) Url() string

type HttpPost

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

func (*HttpPost) Duration

func (hpst *HttpPost) Duration() time.Duration

func (*HttpPost) Init

func (hpst *HttpPost) Init(url string, duration time.Duration, body url.Values)

func (*HttpPost) Request

func (hpst *HttpPost) Request(gh GeneralHeader, rqh RequestHeader) ([]byte, error)

func (*HttpPost) SetBody

func (hpst *HttpPost) SetBody(body url.Values)

func (*HttpPost) SetDuration

func (hpst *HttpPost) SetDuration(duration time.Duration)

func (*HttpPost) SetUrl

func (hpst *HttpPost) SetUrl(url string)

func (*HttpPost) Status

func (hpst *HttpPost) Status() string

func (*HttpPost) StatusCode

func (hpst *HttpPost) StatusCode() int

func (*HttpPost) Url

func (hpst *HttpPost) Url() string

type HttpsGet

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

func (*HttpsGet) Duration

func (hget *HttpsGet) Duration() time.Duration

func (*HttpsGet) Init

func (hget *HttpsGet) Init(url string, duration time.Duration, query url.Values)

func (*HttpsGet) Request

func (hget *HttpsGet) Request(gh GeneralHeader, rqh RequestHeader) ([]byte, error)

func (*HttpsGet) SetDuration

func (hget *HttpsGet) SetDuration(duration time.Duration)

func (*HttpsGet) SetQuery

func (hget *HttpsGet) SetQuery(query url.Values)

func (*HttpsGet) SetUrl

func (hget *HttpsGet) SetUrl(url string)

func (*HttpsGet) Status

func (hget *HttpsGet) Status() string

func (*HttpsGet) StatusCode

func (hget *HttpsGet) StatusCode() int

func (*HttpsGet) Url

func (hget *HttpsGet) Url() string

type HttpsPost

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

func (*HttpsPost) Duration

func (hpst *HttpsPost) Duration() time.Duration

func (*HttpsPost) Init

func (hpst *HttpsPost) Init(url string, duration time.Duration, body url.Values)

func (*HttpsPost) Request

func (hpst *HttpsPost) Request(gh GeneralHeader, rqh RequestHeader) ([]byte, error)

func (*HttpsPost) SetBody

func (hpst *HttpsPost) SetBody(body url.Values)

func (*HttpsPost) SetDuration

func (hpst *HttpsPost) SetDuration(duration time.Duration)

func (*HttpsPost) SetUrl

func (hpst *HttpsPost) SetUrl(url string)

func (*HttpsPost) Status

func (hpst *HttpsPost) Status() string

func (*HttpsPost) StatusCode

func (hpst *HttpsPost) StatusCode() int

func (*HttpsPost) Url

func (hpst *HttpsPost) Url() string

type MimeType

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

func (*MimeType) SetSubtype

func (m *MimeType) SetSubtype(mSubtype string)

func (*MimeType) SetType

func (m *MimeType) SetType(mType string)

func (*MimeType) Subtype

func (m *MimeType) Subtype() string

func (*MimeType) Type

func (m *MimeType) Type() string

type RequestHeader

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

func (*RequestHeader) Accept

func (rqh *RequestHeader) Accept() string

func (*RequestHeader) AcceptCharset

func (rqh *RequestHeader) AcceptCharset() string

func (*RequestHeader) Authorization

func (rqh *RequestHeader) Authorization() string

func (*RequestHeader) ContentType

func (rqh *RequestHeader) ContentType() string

func (*RequestHeader) From

func (rqh *RequestHeader) From() string

func (*RequestHeader) Init

func (rqh *RequestHeader) Init() error

func (*RequestHeader) Referer

func (rqh *RequestHeader) Referer() string

func (*RequestHeader) SetAccept

func (rqh *RequestHeader) SetAccept(accept string)

func (*RequestHeader) SetAcceptCharset

func (rqh *RequestHeader) SetAcceptCharset(acceptcharset string)

func (*RequestHeader) SetAuthorization

func (rqh *RequestHeader) SetAuthorization(authorization string)

func (*RequestHeader) SetContentType

func (rqh *RequestHeader) SetContentType(contenttype string)

func (*RequestHeader) SetFrom

func (rqh *RequestHeader) SetFrom(from string)

func (*RequestHeader) SetReferer

func (rqh *RequestHeader) SetReferer(referer string)

func (*RequestHeader) SetUserAgent

func (rqh *RequestHeader) SetUserAgent(useragent string)

func (*RequestHeader) UserAgent

func (rqh *RequestHeader) UserAgent() string

Jump to

Keyboard shortcuts

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