client

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 15 Imported by: 0

README

http-client

A Go HTTP client library with support for compression, progress tracking, and connection pooling.

Features

  • Simple API for GET, POST, PUT, PATCH, DELETE requests
  • Compression (gzip, deflate, brotli, custom)
  • Upload and download progress tracking
  • File uploads with automatic content-type detection
  • Redirect handling with method preservation
  • Range requests for partial downloads and resumable transfers
  • Request tracing with UUID/ULID identifiers
  • Protocol selection (HTTP/1, HTTP/2)
  • Multipart form uploads
  • Reusable client with connection pooling and response history

Installation

go get github.com/jpl-au/http-client

Quick Start

For simple, one-off requests, use the package-level functions:

package main

import (
    "fmt"
    "log"

    client "github.com/jpl-au/http-client"
)

func main() {
    resp, err := client.Get("https://httpbin.org/get")
    if err != nil {
        log.Fatal(err)
    }
    fmt.Println(resp.String())
}

Configuration

Use options.Option to customise requests:

import (
    client "github.com/jpl-au/http-client"
    "github.com/jpl-au/http-client/options"
)

opt := options.New().
    AddHeader("Authorization", "Bearer token").
    AddHeader("Content-Type", "application/json")

resp, err := client.Post(url, payload, opt)

File Uploads

opt := options.New()
if err := opt.PrepareFile("/path/to/file.txt"); err != nil {
    log.Fatal(err)
}
resp, err := client.Post(url, nil, opt)
Using the PostFile helper
resp, err := client.PostFile(url, "/path/to/file.txt")
Passing a file handle
file, _ := os.Open("data.json")
defer file.Close()

resp, err := client.Post(url, file, opt)

Compression

opt := options.New().SetCompression(options.CompressionGzip)
resp, err := client.Post(url, largePayload, opt)

Supported types: CompressionGzip, CompressionDeflate, CompressionBrotli

Custom Compression
opt := options.New()
opt.SetCompression(options.CompressionCustom)
opt.Compression.CustomType = "snappy"
opt.Compression.Compressor = func(w *io.PipeWriter) (io.WriteCloser, error) {
    return snappy.NewBufferedWriter(w), nil
}

Progress Tracking

opt := options.New()
opt.Progress.OnUpload = func(bytesRead, totalBytes int64) {
    pct := float64(bytesRead) / float64(totalBytes) * 100
    fmt.Printf("\rUploading: %.1f%%", pct)
}
opt.Progress.OnDownload = func(bytesRead, totalBytes int64) {
    pct := float64(bytesRead) / float64(totalBytes) * 100
    fmt.Printf("\rDownloading: %.1f%%", pct)
}

resp, err := client.PostFile(url, "large-file.zip", opt)

Redirect Handling

opt := options.New()
opt.Redirect.Follow = true          // follow redirects (default: false)
opt.Redirect.PreserveMethod = true  // preserve POST/PUT method on redirect
opt.Redirect.Max = 10               // maximum redirects (default: 10)

Range Requests

Download partial content or resume interrupted downloads:

// Download bytes 0-499
opt := options.New().SetRange(0, 499)
resp, err := client.Get(url, opt)

// Download from offset to end
opt := options.New().SetRangeFrom(1000)
resp, err := client.Get(url, opt)

// Download the last 1024 bytes
opt := options.New().SetRangeLast(1024)
resp, err := client.Get(url, opt)

// Resume a partial download
opt := options.New().Resume("/path/to/partial-file.zip")
resp, err := client.Get(url, opt)

Request Tracing

Add unique identifiers to requests for distributed tracing:

opt := options.New().SetIdentifierType(options.IdentifierULID)  // default
// or
opt := options.New().SetIdentifierType(options.IdentifierUUID)

// Access the identifier from the response
fmt.Println(resp.UniqueIdentifier)

Protocol Selection

Control the HTTP protocol version:

opt := options.New().SetProtocol(options.HTTP1)  // Force HTTP/1.1
opt := options.New().SetProtocol(options.HTTP2)  // Force HTTP/2 (HTTPS only)
opt := options.New().SetProtocol(options.Both)   // Auto-negotiate (default)

Writing Responses to a File

Download content directly to a file without buffering in memory:

opt := options.New().SetFileOutput("/path/to/output.txt")

resp, err := client.Get(url, opt)
// Response body is written directly to the file

Reusable Client

For applications making multiple HTTP requests, the Client type provides connection pooling, shared configuration, and response history tracking.

Why Use a Reusable Client?
  • Connection pooling: Requests to the same host reuse TCP connections, reducing latency and resource usage
  • Shared configuration: Global options (headers, authentication) are applied to all requests automatically
  • Response history: All responses are stored for later inspection, useful for debugging, logging, or batch operations
Basic Usage
c := client.New(options.New().
    AddHeader("X-API-Key", "secret"))

// All requests share connections and include the API key header
resp1, _ := c.Get(url1)
resp2, _ := c.Post(url2, data)
Response History

The client stores all responses in an internal map, enabling batch operations and deferred error handling:

// Make multiple requests
c.Get(url1)
c.Get(url2)
c.Post(url3, data)

// Inspect all responses afterwards
for _, resp := range c.Responses() {
    if resp.Error != nil {
        log.Printf("Request to %s failed: %v", resp.URL, resp.Error)
        continue
    }
    fmt.Printf("%s: %d\n", resp.URL, resp.StatusCode)
}

// Retrieve a specific response by its unique identifier
resp := c.Response(someID)

The Error field on each response allows you to collect results from many requests and check for failures later, rather than handling errors inline.

Memory Management

Response history grows with each request. To prevent unbounded memory usage, the client provides automatic limits and manual controls:

// Configure limits (call before making requests)
c.SetMaxResponses(500)              // Maximum responses to retain (default: 1000)
c.SetResponseTTL(10 * time.Minute)  // Expire responses after this duration (default: 5 minutes)

// Manual cleanup
c.Clear()  // Remove all stored responses

Responses older than the TTL are automatically removed during cleanup. When the maximum is reached, the oldest entries are evicted first.

Managing Global Options
// Get current global options
opts := c.GlobalOptions()

// Merge additional options (preserves existing settings)
c.AddGlobalOptions(options.New().AddHeader("X-New-Header", "value"))

// Replace global options entirely
c.UpdateGlobalOptions(options.New().AddHeader("Authorization", "Bearer new-token"))

// Clone options for per-request modifications
opt := c.CloneOptions()
opt.AddHeader("X-Request-Specific", "value")
resp, _ := c.Get(url, opt)

Response

The Response type contains the HTTP response data and metadata:

resp, err := client.Get(url)

resp.StatusCode       // HTTP status code (e.g., 200)
resp.Status           // Status text (e.g., "200 OK")
resp.String()         // Body as string
resp.Bytes()          // Body as []byte
resp.Buffer()         // Body as *bytes.Buffer
resp.Header           // Response headers
resp.Cookies          // Response cookies
resp.AccessTime       // Request duration
resp.Redirected       // Whether a redirect occurred
resp.Location         // Final URL after redirects
resp.UniqueIdentifier // Request trace ID
resp.Error            // Any error encountered (for batch inspection)

Testing

See the test directory for comprehensive examples and test cases.

Licence

MIT

Documentation

Overview

Package client provides a convenient HTTP client with support for common operations like GET, POST, PUT, PATCH, DELETE, file uploads, compression, and progress tracking.

Quick Start

The simplest way to make requests is using the package-level functions:

resp, err := client.Get("https://httpbin.org/get")
if err != nil {
    log.Fatal(err)
}
fmt.Println(resp.String())

Configuring Requests

Use options.Option to customize requests with headers, compression, redirects, and progress tracking:

opt := options.New().
    AddHeader("Authorization", "Bearer token").
    SetCompression(options.CompressionGzip)

resp, err := client.Post(url, payload, opt)

Reusable Client

For connection pooling and shared configuration, use Client:

c := client.New(options.New().
    AddHeader("X-API-Key", "secret"))

resp1, _ := c.Get(url1)
resp2, _ := c.Get(url2)  // reuses connections

File Uploads

Upload files using PostFile, PutFile, or PatchFile:

resp, err := client.PostFile(url, "/path/to/file.txt")

Or pass an *os.File directly as payload:

file, _ := os.Open("data.json")
defer file.Close()
resp, err := client.Post(url, file, opt)

Compression

Compress request payloads with gzip, deflate, or brotli:

opt := options.New().SetCompression(options.CompressionGzip)
resp, err := client.Post(url, largePayload, opt)

Response decompression is automatic based on Content-Encoding headers.

Progress Tracking

Monitor upload and download progress:

opt := options.New()
opt.Progress.OnUpload = func(bytesRead, totalBytes int64) {
    fmt.Printf("Upload: %.1f%%\n", float64(bytesRead)/float64(totalBytes)*100)
}
opt.Progress.OnDownload = func(bytesRead, totalBytes int64) {
    fmt.Printf("Download: %.1f%%\n", float64(bytesRead)/float64(totalBytes)*100)
}

Redirects

Configure redirect behavior:

opt := options.New()
opt.Redirect.Follow = true           // follow redirects (default)
opt.Redirect.PreserveMethod = true   // keep POST on redirect
opt.Redirect.Max = 10                // maximum redirects

Index

Constants

View Source
const (
	DefaultMaxResponses = 1000            // Maximum number of responses to keep.
	DefaultResponseTTL  = 5 * time.Minute // How long to keep responses before expiry.
)

Default configuration for response history.

View Source
const (
	SchemeHTTP      string = "http://"
	SchemeHTTPS     string = "https://"
	SchemeWS        string = "ws://"
	SchemeWSS       string = "wss://"
	ContentType     string = "Content-Type"
	ContentEncoding string = "Content-Encoding"
	URLencoded      string = "application/x-www-form-urlencoded"
)

Variables

View Source
var (
	// ErrMaxRedirectsExceeded is returned when the number of redirects exceeds the configured maximum.
	ErrMaxRedirectsExceeded = errors.New("max redirects exceeded")

	// ErrEmptyURL is returned when an empty URL is provided.
	ErrEmptyURL = errors.New("empty URL")

	// ErrInvalidURL is returned when the URL cannot be parsed.
	ErrInvalidURL = errors.New("invalid URL")

	// ErrMissingHost is returned when the URL has no host component.
	ErrMissingHost = errors.New("missing host")

	// ErrRedirectMissingLocation is returned when a redirect response has no Location header.
	ErrRedirectMissingLocation = errors.New("redirect location header missing")

	// ErrPayloadNotReplayable is returned when a redirect or retry is needed but the
	// payload is a non-seekable io.Reader that exceeds the buffer limit and cannot be replayed.
	ErrPayloadNotReplayable = errors.New("payload cannot be replayed: non-seekable reader exceeds buffer limit")
)

Sentinel errors for request handling

Functions

func Connect

func Connect(url string, opts ...*options.Option) (response.Response, error)

Connect performs an HTTP CONNECT to the specified URL. It accepts the URL string as its first argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func Custom

func Custom(method string, url string, payload any, opts ...*options.Option) (response.Response, error)

Custom performs a custom HTTP method to the specified URL with the given payload. It accepts the HTTP method as its first argument, the URL string as the second argument, the payload as the third argument, and optionally additional Options to customize the request. Returns the HTTP response and an error if any.

func Delete

func Delete(url string, opts ...*options.Option) (response.Response, error)

Delete performs an HTTP DELETE to the specified URL. It accepts the URL string as its first argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func Get

func Get(url string, opts ...*options.Option) (response.Response, error)

Get performs an HTTP GET to the specified URL. It accepts the URL string as its first argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func Head(url string, opts ...*options.Option) (response.Response, error)

Head performs an HTTP HEAD to the specified URL. It accepts the URL string as its first argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func MultipartUpload

func MultipartUpload(method, url string, payload map[string]any, opts ...*options.Option) (response.Response, error)

MultipartUpload performs a multipart form-data upload request to the specified URL. It supports file uploads and other form fields.

func Options

func Options(url string, opts ...*options.Option) (response.Response, error)

Options performs an HTTP OPTIONS to the specified URL. It accepts the URL string as its first argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func Patch

func Patch(url string, payload any, opts ...*options.Option) (response.Response, error)

Patch performs an HTTP PATCH to the specified URL with the given payload. It accepts the URL string as its first argument and the payload as the second argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func PatchFile

func PatchFile(url string, filename string, opts ...*options.Option) (response.Response, error)

PatchFile uploads a file to the specified URL using an HTTP PATCH request. It accepts the URL string as its first argument and the filename as the second argument. The file is read from the specified filename and uploaded as the request payload. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func PatchFormData

func PatchFormData(url string, payload map[string]string, opts ...*options.Option) (response.Response, error)

PatchFormData performs an HTTP PATCH as an x-www-form-urlencoded payload to the specified URL. It accepts the URL string as its first argument and a map[string]string the payload. The map is converted to a url.QueryEscaped k/v pair that is sent to the server. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func PatchMultipartUpload

func PatchMultipartUpload(url string, payload map[string]interface{}, opts ...*options.Option) (response.Response, error)

PatchMultipartUpload performs a PATCH multipart form-data upload request to the specified URL. This method can be used for partial updates to a resource, which might include updating or adding new file attachments.

func Post

func Post(url string, payload any, opts ...*options.Option) (response.Response, error)

Post performs an HTTP POST to the specified URL with the given payload. It accepts the URL string as its first argument and the payload as the second argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func PostFile

func PostFile(url string, filename string, opts ...*options.Option) (response.Response, error)

PostFile uploads a file to the specified URL using an HTTP POST request. It accepts the URL string as its first argument and the filename as the second argument. The file is read from the specified filename and uploaded as the request payload. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func PostFormData

func PostFormData(url string, payload map[string]string, opts ...*options.Option) (response.Response, error)

PostFormData performs an HTTP POST as an x-www-form-urlencoded payload to the specified URL. It accepts the URL string as its first argument and a map[string]string the payload. The map is converted to a url.QueryEscaped k/v pair that is sent to the server. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func PostMultipartUpload

func PostMultipartUpload(url string, payload map[string]interface{}, opts ...*options.Option) (response.Response, error)

PostMultipartUpload performs a POST multipart form-data upload request to the specified URL. This is the most common method for file uploads and creating new resources with file attachments.

func Put

func Put(url string, payload any, opts ...*options.Option) (response.Response, error)

Put performs an HTTP PUT to the specified URL with the given payload. It accepts the URL string as its first argument and the payload as the second argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func PutFile

func PutFile(url string, filename string, opts ...*options.Option) (response.Response, error)

PutFile uploads a file to the specified URL using an HTTP PUT request. It accepts the URL string as its first argument and the filename as the second argument. The file is read from the specified filename and uploaded as the request payload. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func PutFormData

func PutFormData(url string, payload map[string]string, opts ...*options.Option) (response.Response, error)

PutFormData performs an HTTP PUT as an x-www-form-urlencoded payload to the specified URL. It accepts the URL string as its first argument and a map[string]string the payload. The map is converted to a url.QueryEscaped k/v pair that is sent to the server. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func PutMultipartUpload

func PutMultipartUpload(url string, payload map[string]interface{}, opts ...*options.Option) (response.Response, error)

PutMultipartUpload performs a PUT multipart form-data upload request to the specified URL. This method is less common but can be used when updating an entire resource with new data, including file attachments.

func Trace

func Trace(url string, opts ...*options.Option) (response.Response, error)

Trace performs an HTTP TRACE to the specified URL. It accepts the URL string as its first argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a reusable HTTP client with persistent connection pooling. All requests made through a Client instance share the same underlying http.Client, enabling connection reuse and improved performance for multiple requests to the same hosts.

func New

func New(opts ...*options.Option) *Client

New returns a reusable Client with a persistent http.Client for connection pooling. Global options can be provided which will be applied to all subsequent requests.

func NewCustom

func NewCustom(client *http.Client, opts ...*options.Option) *Client

NewCustom returns a reusable Client with a custom http.Client for connection pooling. Use this when you need specific http.Client configurations such as custom timeouts, transport settings, or TLS configuration. The provided client will be shared across all requests made through this Client instance.

func (*Client) AddGlobalOptions

func (c *Client) AddGlobalOptions(opts *options.Option)

AddGlobalOptions merges the provided options into the client's existing global options. This preserves existing settings while adding or overwriting specific values from opts. Use UpdateGlobalOptions instead if you want to completely replace the global options.

func (*Client) Clear

func (c *Client) Clear()

Clear clears any Responses that have already been made and kept.

func (*Client) CloneOptions

func (c *Client) CloneOptions() *options.Option

CloneOptions returns a deep copy of the client's global options.

The returned Option can be modified without affecting the client's global configuration. This is used internally for per-request option merging and can be used externally to create request-specific variations.

func (*Client) Connect

func (c *Client) Connect(url string, opts ...*options.Option) (response.Response, error)

Connect performs an HTTP CONNECT to the specified URL. It accepts the URL string as its first argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) Custom

func (c *Client) Custom(method string, url string, payload any, opts ...*options.Option) (response.Response, error)

Custom performs a custom HTTP method to the specified URL with the given payload. It accepts the HTTP method as its first argument, the URL string as the second argument, the payload as the third argument, and optionally additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) Delete

func (c *Client) Delete(url string, opts ...*options.Option) (response.Response, error)

Delete performs an HTTP DELETE to the specified URL. It accepts the URL string as its first argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) Get

func (c *Client) Get(url string, opts ...*options.Option) (response.Response, error)

Get performs an HTTP GET to the specified URL. It accepts the URL string as its first argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) GlobalOptions

func (c *Client) GlobalOptions() *options.Option

GlobalOptions returns the global RequestOptions of the client.

func (*Client) Head

func (c *Client) Head(url string, opts ...*options.Option) (response.Response, error)

Head performs an HTTP HEAD to the specified URL. It accepts the URL string as its first argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) Options

func (c *Client) Options(url string, opts ...*options.Option) (response.Response, error)

Options performs an HTTP OPTIONS to the specified URL. It accepts the URL string as its first argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) Patch

func (c *Client) Patch(url string, payload any, opts ...*options.Option) (response.Response, error)

Patch performs an HTTP PATCH to the specified URL with the given payload. It accepts the URL string as its first argument and the payload as the second argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) PatchFile

func (c *Client) PatchFile(url string, filename string, opts ...*options.Option) (response.Response, error)

PatchFile uploads a file to the specified URL using an HTTP PATCH request. It accepts the URL string as its first argument and the filename as the second argument. The file is read from the specified filename and uploaded as the request payload. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) PatchFormData

func (c *Client) PatchFormData(url string, payload map[string]string, opts ...*options.Option) (response.Response, error)

PatchFormData performs an HTTP PATCH as an x-www-form-urlencoded payload to the specified URL. It accepts the URL string as its first argument and a map[string]string the payload. The map is converted to a url.QueryEscaped k/v pair that is sent to the server. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) Post

func (c *Client) Post(url string, payload any, opts ...*options.Option) (response.Response, error)

Post performs an HTTP POST to the specified URL with the given payload. It accepts the URL string as its first argument and the payload as the second argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) PostFile

func (c *Client) PostFile(url string, filename string, opts ...*options.Option) (response.Response, error)

PostFile uploads a file to the specified URL using an HTTP POST request. It accepts the URL string as its first argument and the filename as the second argument. The file is read from the specified filename and uploaded as the request payload. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) PostFormData

func (c *Client) PostFormData(url string, payload map[string]string, opts ...*options.Option) (response.Response, error)

PostFormData performs an HTTP POST as an x-www-form-urlencoded payload to the specified URL. It accepts the URL string as its first argument and a map[string]string the payload. The map is converted to a url.QueryEscaped k/v pair that is sent to the server. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) Put

func (c *Client) Put(url string, payload any, opts ...*options.Option) (response.Response, error)

Put performs an HTTP PUT to the specified URL with the given payload. It accepts the URL string as its first argument and the payload as the second argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) PutFile

func (c *Client) PutFile(url string, filename string, opts ...*options.Option) (response.Response, error)

PutFile uploads a file to the specified URL using an HTTP PUT request. It accepts the URL string as its first argument and the filename as the second argument. The file is read from the specified filename and uploaded as the request payload. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) PutFormData

func (c *Client) PutFormData(url string, payload map[string]string, opts ...*options.Option) (response.Response, error)

PutFormData performs an HTTP PUT as an x-www-form-urlencoded payload to the specified URL. It accepts the URL string as its first argument and a map[string]string the payload. The map is converted to a url.QueryEscaped k/v pair that is sent to the server. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) Response

func (c *Client) Response(id string) *response.Response

Response retrieves a specific response by its UniqueIdentifier. Returns nil if the response is not found or has expired.

func (*Client) ResponseCount

func (c *Client) ResponseCount() int

ResponseCount returns the number of stored responses (including expired ones that haven't been cleaned up yet).

func (*Client) Responses

func (c *Client) Responses() []response.Response

Responses returns a slice of all non-expired responses made by this Client. Responses are returned in no guaranteed order.

func (*Client) SetMaxResponses

func (c *Client) SetMaxResponses(max int)

SetMaxResponses sets the maximum number of responses to keep. When the limit is exceeded, expired entries are cleaned up first, then oldest entries are removed if still over the limit.

func (*Client) SetResponseTTL

func (c *Client) SetResponseTTL(ttl time.Duration)

SetResponseTTL sets how long responses are kept before being eligible for cleanup. Responses older than the TTL are removed during cleanup operations.

func (*Client) Trace

func (c *Client) Trace(url string, opts ...*options.Option) (response.Response, error)

Trace performs an HTTP TRACE to the specified URL. It accepts the URL string as its first argument. Optionally, you can provide additional Options to customize the request. Returns the HTTP response and an error if any.

func (*Client) UpdateGlobalOptions

func (c *Client) UpdateGlobalOptions(opts *options.Option)

UpdateGlobalOptions replaces the client's global options entirely with the provided options. This discards all existing global settings. Use AddGlobalOptions instead if you want to merge new settings while preserving existing ones.

Directories

Path Synopsis
Package options provides configuration types for the HTTP client.
Package options provides configuration types for the HTTP client.
Package progress provides utilities for displaying progress bars in the terminal.
Package progress provides utilities for displaying progress bars in the terminal.
Package response provides the Response type returned by HTTP client operations.
Package response provides the Response type returned by HTTP client operations.

Jump to

Keyboard shortcuts

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