{"modulePath":"github.com/dispatchrun/dispatch-go","version":"v0.1.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package dispatchhttp\n\n## Variables\n\n```go\nvar DefaultClient = \u0026Client{Client: http.DefaultClient}\n```\nDefaultClient is the default client.\n\n## Types\n\n```go\ntype Client struct{ Client *http.Client }\n```\nClient wraps an http.Client to accept Request instances and return Response instances.\n\n```go\nfunc (c *Client) Do(ctx context.Context, r *Request) (*Response, error)\n```\nDo makes a HTTP Request and returns its Response.\n\n```go\nfunc (c *Client) Get(ctx context.Context, url string) (*Response, error)\n```\nGet makes an HTTP GET request to the specified URL and returns its Response.\n\n```go\ntype Request struct {\n\tMethod string\n\tURL    string\n\tHeader http.Header\n\tBody   []byte\n}\n```\nRequest is an HTTP request.\n\n```go\nfunc (r *Request) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *Request) UnmarshalJSON(b []byte) error\n```\n\n```go\ntype Response struct {\n\tStatusCode int\n\tHeader     http.Header\n\tBody       []byte\n}\n```\nResponse is an HTTP response.\n\n```go\nfunc FromResponse(r *http.Response) (*Response, error)\n```\nFromResponse creates a Response from an http.Response.\n\nThe http.Response.Body is consumed and closed by this operation.\n\n```go\nfunc Get(ctx context.Context, url string) (*Response, error)\n```\nGet makes an HTTP GET request to the specified URL and returns its Response.\n\n```go\nfunc (r *Response) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *Response) Status() dispatchproto.Status\n```\nStatus is the status for the response.\n\n```go\nfunc (r *Response) UnmarshalJSON(b []byte) error\n```\n\n","path":"github.com/dispatchrun/dispatch-go/dispatchhttp","name":"dispatchhttp","synopsis":"","isRedistributable":true}
