httptool

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GET      = "GET"
	POST     = "POST"
	PUT      = "PUT"
	PATCH    = "PATCH"
	DELETE   = "DELETE"
	COPY     = "COPY"
	HEAD     = "HEAD"
	OPTIONS  = "OPTIONS"
	LINK     = "LINK"
	UNLINK   = "UNLINK"
	PURGE    = "PURGE"
	LOCK     = "LOCK"
	UNLOCK   = "UNLOCK"
	PROPFIND = "PROPFIND"
	VIEW     = "VIEW"

	REQUEST  = "Request"
	RESPONSE = "Response"
	SUCCESS  = "Success"
	FAIL     = "Fail"
	NONE     = "NONE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option struct {
	URL                       string
	Name                      string
	MaxConnsPerHost           int
	MaxIdemponentCallAttempts int
	ReadTimeout               time.Duration
	WriteTimeout              time.Duration
}

type Response

type Response struct {
}

type Service

type Service struct {
	Client *fasthttp.Client
	// contains filtered or unexported fields
}

Service -

func NewClient

func NewClient(option *Option) (*Service, error)

NewClient -發起一個http client

func (*Service) DelByte

func (c *Service) DelByte(path, query string) ([]byte, error)

DelByte - 取得回應格式為[]byte

func (*Service) DelString

func (c *Service) DelString(path, query string) (body string, err error)

DelString - 取得回應格式為String

func (*Service) GetByte

func (c *Service) GetByte(path, query string) ([]byte, error)

GetByte - 取得回應格式為[]byte

func (*Service) GetString

func (c *Service) GetString(path, query string) (body string, err error)

GetString - 取得回應格式為String

func (*Service) PatchByte

func (c *Service) PatchByte(path string, data interface{}) ([]byte, error)

PatchByte - 取得回應格式為[]byte

func (*Service) PatchString

func (c *Service) PatchString(path string, data interface{}) (body string, err error)

PatchString - 取得回應格式為String

func (*Service) PostByte

func (c *Service) PostByte(path string, data interface{}) ([]byte, error)

PostByte - 取得回應格式為[]byte

func (*Service) PostString

func (c *Service) PostString(path string, data interface{}) (body string, err error)

PostString - 取得回應格式為String

func (*Service) PutByte

func (c *Service) PutByte(path string, data interface{}) ([]byte, error)

PutByte - 取得回應格式為[]byte

func (*Service) PutString

func (c *Service) PutString(path string, data interface{}) (body string, err error)

PutString - 取得回應格式為String

Jump to

Keyboard shortcuts

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