Documentation
¶
Index ¶
- type Msg
- type Request
- func (request *Request) AddClientCert(certs *tls.Config) *Request
- func (request *Request) AddHeaders(headers map[string]string) *Request
- func (request *Request) Get(path string, data map[string]interface{}) []byte
- func (request *Request) GetHeader(key string) string
- func (request *Request) Post(path string, data map[string]interface{}) []byte
- func (request *Request) Put(path string, data map[string]interface{}) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request is a much faster implementation compared to the standard library one, at the cost of not being 100% compliant.
func NewRequest ¶
NewRequest returns a pointer to a new instance of the client. You should store the client on the object level and re-use it, it makes less sense to actually instantiate a new one inside of individual methods, as you lose out on the builtin concurrency and buffer pools.
func (*Request) AddClientCert ¶
AddClientCert configures a client certificate for accessing services that require this type of authorization.
func (*Request) AddHeaders ¶
AddHeaders allows you to pass in a map[string]string object which will be iterated over to be converted into HTTP request headers.