http

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(params Params) (body io.ReadCloser, err error)

Get is a helper method for obtaining online files via GET call

func GetText

func GetText(params Params) (text string, err error)

GetText is a helper method for obtaining online files as string via GET call

func Post added in v0.0.4

func Post(params Params) (body io.ReadCloser, err error)

Post sends a POST request to the given URL

Types

type Params added in v0.0.4

type Params interface {
	GetURL() string
	GetReferer() string
}

Params is an interface for request parameters

type RequestParams added in v0.0.4

type RequestParams struct {
	URL     string
	Referer string
}

RequestParams is a struct for base request parameters

func (RequestParams) GetReferer added in v0.0.4

func (r RequestParams) GetReferer() string

GetReferer returns the request referer

func (RequestParams) GetURL added in v0.0.4

func (r RequestParams) GetURL() string

GetURL returns the request URL

Jump to

Keyboard shortcuts

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