http

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: May 25, 2025 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const UserAgent = "imdb2mkvtags/1.0"

Variables

This section is empty.

Functions

func Body

func Body(client *http.Client, req *http.Request, dest io.Writer) error

Makes an HTTP request and writes the body to dest. If client is nil, the library's default client will be used.

func GetBody

func GetBody(client *http.Client, url string, dest io.Writer, lang ...*lcconv.LngCntry) error

Makes an HTTP request to URL url, writes the answer's body to dest. If client is nil the library's default client will be used. If lang is not nil, the parameter will be used to set the request's Accept-Language parameter.

func NewBareReq

func NewBareReq(method, url string, body io.Reader) (*http.Request, error)

Returns a new http request with default header fields

func SetReqAccLang

func SetReqAccLang(req *http.Request, lang ...*lcconv.LngCntry) error

Sets the passed language objects as the request's "Accept-Language" header field. Rejects formally malformed language strings to prevent header field injection.

Types

This section is empty.

Jump to

Keyboard shortcuts

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