http

package
v2.7.19-test Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	HTTPS_SCHEME = "https://"

	DeviceIDKey       = "deviceID"
	ResourceHrefKey   = "resourceHref"
	SubscriptionIDKey = "subscriptionID"

	ContentQueryKey = "content"
)

Variables

This section is empty.

Functions

func DoHTTPRequest

func DoHTTPRequest(t *testing.T, req *http.Request) *http.Response

func ReadHTTPResponse

func ReadHTTPResponse(t *testing.T, w io.Reader, contentType string, data interface{})

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) Build

func (c *HTTPRequestBuilder) Build(ctx context.Context, t *testing.T) *http.Request

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

Jump to

Keyboard shortcuts

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