Documentation ¶
Index ¶
- func MarshalJson(data interface{}) io.ReadCloser
- func MarshalString(data string) io.ReadCloser
- type HttpClient
- func (h *HttpClient) AddGetResponse(res *http.Response, err error) *HttpClient
- func (h HttpClient) AddPlugin(p heimdall.Plugin)
- func (h *HttpClient) AddPostResponse(res *http.Response, err error) *HttpClient
- func (h *HttpClient) AddPutResponse(res *http.Response, err error) *HttpClient
- func (h HttpClient) Delete(url string, headers http.Header) (*http.Response, error)
- func (h HttpClient) Do(req *http.Request) (*http.Response, error)
- func (h HttpClient) Get(url string, headers http.Header) (*http.Response, error)
- func (h HttpClient) Patch(url string, body io.Reader, headers http.Header) (*http.Response, error)
- func (h *HttpClient) Post(url string, body io.Reader, headers http.Header) (*http.Response, error)
- func (h HttpClient) Put(url string, body io.Reader, headers http.Header) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalJson ¶
func MarshalJson(data interface{}) io.ReadCloser
func MarshalString ¶
func MarshalString(data string) io.ReadCloser
Types ¶
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
func NewHttpClient ¶
func NewHttpClient() *HttpClient
func (*HttpClient) AddGetResponse ¶
func (h *HttpClient) AddGetResponse(res *http.Response, err error) *HttpClient
func (HttpClient) AddPlugin ¶
func (h HttpClient) AddPlugin(p heimdall.Plugin)
func (*HttpClient) AddPostResponse ¶
func (h *HttpClient) AddPostResponse(res *http.Response, err error) *HttpClient
func (*HttpClient) AddPutResponse ¶
func (h *HttpClient) AddPutResponse(res *http.Response, err error) *HttpClient
Click to show internal directories.
Click to hide internal directories.