httputil

package
v0.0.0-...-fe13f99 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2018 License: Apache-2.0 Imports: 1 Imported by: 13

Documentation

Overview

Package httputil contains various http utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendParams

func AppendParams(u *url.URL, nameValues ...string) *url.URL

AppendParams returns a URL with new parameters appended. No existing parameter is replaced. u is the original URL; nameValues is parameter name, parameter value, parameter name, parameter value, etc. nameValues must have even length.

func NewUrl

func NewUrl(path string, nameValues ...string) *url.URL

NewUrl returns a new URL with a given path and parameters. nameValues is parameter name, parameter value, parameter name, parameter value, etc. nameValues must have even length.

func WithParams

func WithParams(u *url.URL, nameValues ...string) *url.URL

WithParams returns a URL with new parameters. If the parameters already exist in the original URL, they are replaced. u is the original URL; nameValues is parameter name, parameter value, parameter name, parameter value, etc. nameValues must have even length.

Types

This section is empty.

Jump to

Keyboard shortcuts

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