httphelper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package httphelper provides simple wrappers for working with HTTP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FQDN

func FQDN() (string, error)

FQDN returns the fully-qualified domain name (or localhost if lookup according to the hostname fails).

func Forward

func Forward(ctx context.Context, host, trimPrefix string, w http.ResponseWriter, r *http.Request) error

Forward forwards r to host and writes the response from host to w.

func Get

func Get(ctx context.Context, url string) (*http.Response, error)

Get returns the contents located at url.

func SetDefaultResponseHeaders

func SetDefaultResponseHeaders(h http.Header)

SetDefaultResponseHeaders sets headers that appear in all WebDriver responses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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