http

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package http provides functions for interacting with a HTTP server.

Index

Constants

View Source
const (
	DefaultPortHTTP  = 80
	DefaultPortHTTPS = 443
)

Variables

This section is empty.

Functions

func Fetch

func Fetch(uri string, options ...ClientOption) (io.ReadCloser, error)

Fetch returns a Reader for an object for given HTTP address. Fetch returns the Reader and error, if any.

Fetch returns an error if the address cannot be reached, the userinfo cannot be parsed, the user and password are invalid, or the file cannot be retrieved.

Types

type Client

type Client struct {
	http.Client
}

type ClientOption

type ClientOption func(client *Client) error

Jump to

Keyboard shortcuts

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