browser

package module
v0.0.0-...-dc9d2a0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: MIT Imports: 2 Imported by: 0

README

Minimum web browser implementation

Just a plain web browser implemented in Golang.

Usage

Install
go install github.com/binzume/browser/cmd/browser
Accees Google!
browser get https://www.google.com/

Nothing is displayed?, but it is okey. This browser does not have the ability to render HTML.

Golang interface
import 	"github.com/binzume/browser"

client, _ := browser.NewWebBrowser()
req, _ := http.NewRequest("GET", os.Args[2], nil)
response, _ := client.Do(req)

WebBrowser is http.Client.

License

MIT License

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultUserAgent = "Mozilla/5.0 WebBrowser"

Functions

This section is empty.

Types

type WebBrowser

type WebBrowser struct {
	http.Client
	UserAgent string
}

func NewWebBrowser

func NewWebBrowser() (*WebBrowser, error)

func (*WebBrowser) RoundTrip

func (b *WebBrowser) RoundTrip(req *http.Request) (*http.Response, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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