http

package
v0.0.0-...-24ca9bf Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT, MIT Imports: 5 Imported by: 0

Documentation

Overview

Package http contains utilities for http requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadURL

func DownloadURL(url, filename string) error

DownloadURL - download content from a URL to <filename>

func Get

func Get(url string) ([]byte, error)

func GetReader

func GetReader(url string) (io.Reader, error)

GetReader returns an io.Reader with the contents of resp.Body.

func PageLines

func PageLines(url string) ([]string, error)

Types

type RWC

type RWC struct {
	*bytes.Buffer
	// contains filtered or unexported fields
}

func (*RWC) Close

func (rwc *RWC) Close() error

Close resets the underlying buffer to empty but retains the buffer for reuse. In order to use the buffer again, call Init()

func (*RWC) Read

func (rwc *RWC) Read(p []byte) (n int, err error)

func (*RWC) Write

func (rwc *RWC) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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