Documentation ¶
Index ¶
- func FindURLByRel(links []httputil.Link, rel string) (string, error)
- func Join(path string, elements ...string) string
- type HttpClient
- func (c HttpClient) Delete(url string) (*http.Response, error)
- func (c HttpClient) DeleteResource(t *testing.T, location *url.URL)
- func (c HttpClient) Get(url string) (*http.Response, error)
- func (c HttpClient) GetStruct(url string, s interface{}) error
- func (c HttpClient) Post(url, requestBody string) (*http.Response, error)
- func (c HttpClient) PostAndAssert(url, requestBody, bodyContent string, t *testing.T) *http.Response
- func (c HttpClient) PostResource(url, requestBody string) (location *url.URL, err error)
- func (c HttpClient) PostResourceAndAssert(url, requestBody, bodyContent string, t *testing.T) *url.URL
- func (c HttpClient) PostStruct(url string, body interface{}) (*http.Response, error)
- func (c HttpClient) PostWithStructResponse(url, requestBody string, response interface{}) error
- func (c HttpClient) PutMultipart(url string, form map[string]string, fileContent []byte, fileContentType string) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HttpClient ¶
func NewClient ¶
func NewClient(timeout time.Duration) HttpClient
func (HttpClient) DeleteResource ¶
func (c HttpClient) DeleteResource(t *testing.T, location *url.URL)
func (HttpClient) GetStruct ¶
func (c HttpClient) GetStruct(url string, s interface{}) error
func (HttpClient) PostAndAssert ¶
func (HttpClient) PostResource ¶
func (c HttpClient) PostResource(url, requestBody string) (location *url.URL, err error)
func (HttpClient) PostResourceAndAssert ¶
func (HttpClient) PostStruct ¶
func (c HttpClient) PostStruct(url string, body interface{}) (*http.Response, error)
func (HttpClient) PostWithStructResponse ¶
func (c HttpClient) PostWithStructResponse(url, requestBody string, response interface{}) error
Click to show internal directories.
Click to hide internal directories.