whttp

package
v0.0.0-...-345ff62 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHTMLTitle

func GetHTMLTitle(requestBody string) (string, bool)

Types

type WHTTPHeader

type WHTTPHeader struct {
	Name  string
	Value string
}

func MakeCustomHeaders

func MakeCustomHeaders(headers []string) (wHeaders []WHTTPHeader, customHost string)

Converts headers from string format (name: value) to WHTTPHeader

type WHTTPReq

type WHTTPReq struct {
	URL        string
	Method     string
	CustomHost string
	Headers    []WHTTPHeader
}

type WHTTPRes

type WHTTPRes struct {
	StatusCode     int
	ResponseLength int
	HTTPTitle      string
	BodyString     string
}

func SendHTTPRequest

func SendHTTPRequest(wReq *WHTTPReq, client *http.Client) (wRes *WHTTPRes, err error)

Jump to

Keyboard shortcuts

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