httpclient

package
v0.0.0-...-91dc64c Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Endpoint

func Endpoint(v string) string

Endpoint

func Init

func Init(cfg *Config)

func JsonMarshal

func JsonMarshal(t interface{}) ([]byte, error)

Types

type Config

type Config struct {
	Token       string `json:"token"          required:"true"`
	Endpoint    string `json:"endpoint"       required:"true"`
	TokenHeader string `json:"token_header"   required:"true"`
}

Config

type HttpClient

type HttpClient interface {
	ForwardTo(req *http.Request, jsonResp interface{}) (statusCode int, code string, err error)
}
var (
	Default HttpClient
)

Jump to

Keyboard shortcuts

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