browser

package module
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: MIT Imports: 8 Imported by: 1

README

Go Browser

Este projeto visa criar um simples Browser para facilitar as interações HTTP.

Requisitos do projeto:

  • Go Lang >= 1.16

Documentation

Index

Constants

View Source
const (
	DEVELOPER    = "developer"
	HOMOLOGATION = "homologation"
	PRODUCTION   = "production"
)
View Source
const VERSION = "v0.5.1"

Variables

This section is empty.

Functions

This section is empty.

Types

type BrowserCli

type BrowserCli interface {
	Get(url string) (*http.Response, error)
	Post(url string, payload io.Reader) (*http.Response, error)
	Put(url string, payload io.Reader) (*http.Response, error)
	Delete(url string) (*http.Response, error)
	List(url string) (*http.Response, error)
	Patch(url string, payload io.Reader) (*http.Response, error)
	CopyConfig() BrowserConfig
	AddHeader(key, value string)
	SetHeader(key, value string)
	GetHeader() http.Header
	SetUserAgentName(name string)
}

func NewBrowser

func NewBrowser(bro_conf BrowserConfig) BrowserCli

type BrowserConfig

type BrowserConfig struct {
	BaseURL         string      `json:"base_url"`
	SSLVerify       bool        `json:"ssl_verify"`
	Header          http.Header `json:"header"`
	Timeout         int64       `json:"timeout"`
	TLSClientConfig *tls.Config `json:"-"`
	ProxyURL        string      `json:"proxy_url"`
	Mode            string      `json:"mode"`
}

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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