httpclient

package
v0.0.0-...-62e3e49 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package httpclient is a higher-level http client wrapping net/http

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(url string, h HeaderMap, w io.Writer) error

GET query, write to w

func GetJson

func GetJson(url string, h HeaderMap, v any) error

GET query, json decode to v

func Post

func Post(url string, body io.Reader, h HeaderMap, w io.Writer) error

POST query, write to w

func PostJson

func PostJson(url string, body io.Reader, h HeaderMap, v any) error

POST query, json decode to v

func Scrape

func Scrape(url string) (*goquery.Document, error)

scrape website with anti-blocking techniques

Types

type HeaderMap

type HeaderMap map[string]string

Jump to

Keyboard shortcuts

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