Documentation
¶
Index ¶
- Constants
- func DoHTTPRequest(t *testing.T, req *http.Request) *http.Response
- func ReadHTTPResponse(t *testing.T, w io.Reader, contentType string) interface{}
- type HTTPRequestBuilder
- func (c *HTTPRequestBuilder) Accept(accept string) *HTTPRequestBuilder
- func (c *HTTPRequestBuilder) AddContentQuery(content string) *HTTPRequestBuilder
- func (c *HTTPRequestBuilder) AddQuery(key string, value ...string) *HTTPRequestBuilder
- func (c *HTTPRequestBuilder) AuthToken(token string) *HTTPRequestBuilder
- func (c *HTTPRequestBuilder) Build(ctx context.Context, t *testing.T) *http.Request
- func (c *HTTPRequestBuilder) DeviceId(deviceID string) *HTTPRequestBuilder
- func (c *HTTPRequestBuilder) ResourceHref(resourceHref string) *HTTPRequestBuilder
- func (c *HTTPRequestBuilder) SetQuery(value string) *HTTPRequestBuilder
- func (c *HTTPRequestBuilder) SubscriptionID(subscriptionID string) *HTTPRequestBuilder
Constants ¶
View Source
const ( HTTPS_SCHEME = "https://" DeviceIDKey = "deviceID" ResourceHrefKey = "resourceHref" SubscriptionIDKey = "subscriptionID" ContentQueryKey = "content" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPRequestBuilder ¶
type HTTPRequestBuilder struct {
// contains filtered or unexported fields
}
func NewHTTPRequest ¶
func NewHTTPRequest(method, url string, body io.Reader) *HTTPRequestBuilder
func (*HTTPRequestBuilder) Accept ¶
func (c *HTTPRequestBuilder) Accept(accept string) *HTTPRequestBuilder
func (*HTTPRequestBuilder) AddContentQuery ¶
func (c *HTTPRequestBuilder) AddContentQuery(content string) *HTTPRequestBuilder
func (*HTTPRequestBuilder) AddQuery ¶
func (c *HTTPRequestBuilder) AddQuery(key string, value ...string) *HTTPRequestBuilder
func (*HTTPRequestBuilder) AuthToken ¶
func (c *HTTPRequestBuilder) AuthToken(token string) *HTTPRequestBuilder
func (*HTTPRequestBuilder) DeviceId ¶
func (c *HTTPRequestBuilder) DeviceId(deviceID string) *HTTPRequestBuilder
func (*HTTPRequestBuilder) ResourceHref ¶
func (c *HTTPRequestBuilder) ResourceHref(resourceHref string) *HTTPRequestBuilder
func (*HTTPRequestBuilder) SetQuery ¶
func (c *HTTPRequestBuilder) SetQuery(value string) *HTTPRequestBuilder
func (*HTTPRequestBuilder) SubscriptionID ¶
func (c *HTTPRequestBuilder) SubscriptionID(subscriptionID string) *HTTPRequestBuilder
Click to show internal directories.
Click to hide internal directories.