Documentation ¶
Index ¶
- type GRPCResponse
- type HTTPMethod
- type HTTPRequest
- type HTTPResponse
- type RequestOption
- func WithBody(data any) RequestOption
- func WithHeader(key, value string) RequestOption
- func WithHeaderString(data string) RequestOption
- func WithHeaders(kv map[string]string) RequestOption
- func WithQuery(query map[string]string) RequestOption
- func WithRedirect(redirect bool) RequestOption
- func WithTimeout(timeout int) RequestOption
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCResponse ¶
type GRPCResponse struct {
Response
}
type HTTPMethod ¶
type HTTPMethod string
const ( GET HTTPMethod = "GET" POST HTTPMethod = "POST" PUT HTTPMethod = "PUT" DELETE HTTPMethod = "DELETE" )
type HTTPRequest ¶
type HTTPResponse ¶
type RequestOption ¶
type RequestOption func(h *HTTPRequest)
func WithBody ¶
func WithBody(data any) RequestOption
func WithHeader ¶
func WithHeader(key, value string) RequestOption
func WithHeaderString ¶
func WithHeaderString(data string) RequestOption
func WithHeaders ¶
func WithHeaders(kv map[string]string) RequestOption
func WithQuery ¶
func WithQuery(query map[string]string) RequestOption
func WithRedirect ¶
func WithRedirect(redirect bool) RequestOption
func WithTimeout ¶
func WithTimeout(timeout int) RequestOption
type Response ¶
type Response struct { Data string `json:"data"` // contains filtered or unexported fields }
func NewResponse ¶
Click to show internal directories.
Click to hide internal directories.