http

package
v0.0.0-...-93e21f3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package http can download objects from HTTP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(config *Config) *Client

func (*Client) CanonicalURI

func (c *Client) CanonicalURI(uri string) (string, error)

CanonicalURI implements gate/server.Source.CanonicalURI.

func (*Client) OpenURI

func (c *Client) OpenURI(ctx Context, uri string, maxSize int) (io.ReadCloser, int64, error)

OpenURI implements gate/server.Source.OpenURI.

type Config

type Config struct {
	Addr string
	Do   func(*http.Request) (*http.Response, error)
}

func (*Config) Configured

func (c *Config) Configured() bool

Jump to

Keyboard shortcuts

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