curl

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractParameters

func ExtractParameters(curlCommand string) (string, map[string][]string)

ExtractParameters parses the curl command and returns the URL and parameters

func GetBody

func GetBody(params map[string][]string) (string, bool)

func GetMethod

func GetMethod(params map[string][]string) string

Types

type Command

type Command struct {
	URL     string
	Headers map[string]string
	Body    string
	HasBody bool
	Method  string
}

func Parse

func Parse(curlCommand string) (*Command, error)

func (Command) ToRequest

func (c Command) ToRequest() (*http.Request, error)

Jump to

Keyboard shortcuts

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