args

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseKV

func ParseKV(data []string, delim, _type string) (map[string]string, error)

ParseKV converts a slice with data in the form of "$1$delim$2" into a map

Types

type Args

type Args struct {
	Method, Output, URL, Proxy, Agent string
	Headers                           map[string]string
	Multi, Include                    bool
	Timeout                           time.Duration
	Data                              *PostData
}

Args holds all the necessary information to perfrom a HTTP request as specified by the user

func (*Args) Extract

func (a *Args) Extract(text, json string, files, data, form []string, multipart bool) error

type PostData

type PostData struct {
	Type    PostDataType
	DataMap map[string]string
	FileMap map[string]string
	Data    string
}

type PostDataType

type PostDataType uint8
const (
	Plain PostDataType = iota
	URLForm
	Multipart
	JSON
)

Jump to

Keyboard shortcuts

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