request

package
v0.10.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ContentTypeForm = "application/x-www-form-urlencoded"
	ContentTypeJSON = "application/json"
)

Variables

View Source
var ErrCancel = errors.New("request cancel by JsonNet")

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Type   string
	Config json.RawMessage
}

type AuthStrategy

type AuthStrategy interface {
	// contains filtered or unexported methods
}

type Builder

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

func NewBuilder

func NewBuilder(config json.RawMessage, client *retryablehttp.Client, l *logrusx.Logger) (*Builder, error)

func (*Builder) BuildRequest

func (b *Builder) BuildRequest(body interface{}) (*retryablehttp.Request, error)

type Config

type Config struct {
	Method      string      `json:"method"`
	URL         string      `json:"url"`
	TemplateURI string      `json:"body"`
	Header      http.Header `json:"header"`
	Auth        Auth        `json:"auth,omitempty"`
}

Jump to

Keyboard shortcuts

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