requestfactory

package
v0.0.0-...-ffd2651 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package requestfactory provides *http.Request factory with default headers and base url.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T struct {
	URL *url.URL
	// contains filtered or unexported fields
}

func New

func New(server *url.URL, header http.Header) *T

New returns http.Request factory for server with default headers.

func (*T) NewRequest

func (r *T) NewRequest(method, relPath string, body io.Reader) (req *http.Request, err error)

func (*T) NewRequestWithContext

func (r *T) NewRequestWithContext(ctx context.Context, method, relPath string, body io.Reader) (req *http.Request, err error)

Jump to

Keyboard shortcuts

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