restutil

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderAuthorization = "Authorization"
	HeaderContentType   = "Content-Type"
	HeaderAccept        = "Accept"

	Bearer = "bearer"
)

Variables

This section is empty.

Functions

func AccessTokenAuthHeader added in v0.0.11

func AccessTokenAuthHeader(token string) (string, string)

func BasicAuth

func BasicAuth(username, password string) string

func BasicAuthHeader

func BasicAuthHeader(username, password string) (string, string)

func PlaceholderUrl

func PlaceholderUrl(url string, params map[string]string) string

func QueryUrl

func QueryUrl(url string, params map[string]string) string

Types

type HeaderBuilder

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

func Headers

func Headers() *HeaderBuilder

func (*HeaderBuilder) Build added in v0.0.7

func (b *HeaderBuilder) Build() map[string]interface{}

func (*HeaderBuilder) WithAccept

func (b *HeaderBuilder) WithAccept(ct string) *HeaderBuilder

func (*HeaderBuilder) WithBasicAuth

func (b *HeaderBuilder) WithBasicAuth(username, password string) *HeaderBuilder

func (*HeaderBuilder) WithContentType

func (b *HeaderBuilder) WithContentType(ct string) *HeaderBuilder

func (*HeaderBuilder) WithKeyValue

func (b *HeaderBuilder) WithKeyValue(k, v string) *HeaderBuilder

Jump to

Keyboard shortcuts

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