Documentation ¶
Index ¶
- Constants
- Variables
- func ClearSpinner()
- func FormatBody(body []byte, mediaType string) ([]byte, error)
- func FormatFileEmbed(fileEmbed string) []byte
- func FormatFilePathsTitle() string
- func FormatHeaders(headers http.Header, directionCharacter string) []byte
- func FormatMultiPart(multipartItems []MultiPartItem, boundary string) ([]byte, error)
- func FormatRequestLine(req http.Request) []byte
- func FormatStatusLine(res http.Response) string
- func PrettifyJson(j []byte) ([]byte, error)
- func PrintSpinner(i int)
- func PrintWarning(err error)
- func WaitForHttpRequest(req *http.Request) (*http.Response, error)
- func WriteMultipart(h HurlFile, writer *multipart.Writer) error
- type HurlConfig
- type HurlFile
- type HurlOutput
- type MultiPartItem
Constants ¶
View Source
const ( ENVKEY = 0 ENVVALUE = 1 )
View Source
const ( METHOD = 0 URL = 1 PROTOCOL = 2 NAME = 0 VALUE = 1 FILE_EMBED_TAG = 0 FILE_EMBED = 1 MULTIPART_FORM_TAG = 0 MULTIPART_NAME = 1 MULTIPART_VALUE = 2 KEY = 0 )
Variables ¶
View Source
var LOADING_CHARS = [...]string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"}
Functions ¶
func ClearSpinner ¶ added in v0.3.3
func ClearSpinner()
func FormatFileEmbed ¶ added in v0.3.4
func FormatFilePathsTitle ¶
func FormatFilePathsTitle() string
func FormatMultiPart ¶ added in v0.3.4
func FormatMultiPart(multipartItems []MultiPartItem, boundary string) ([]byte, error)
func FormatRequestLine ¶
func FormatStatusLine ¶
func PrettifyJson ¶ added in v0.3.5
func PrintSpinner ¶ added in v0.3.3
func PrintSpinner(i int)
func PrintWarning ¶
func PrintWarning(err error)
func WaitForHttpRequest ¶ added in v0.3.3
Types ¶
type HurlConfig ¶ added in v0.2.8
func InitConfig ¶
func InitConfig() (HurlConfig, error)
type HurlFile ¶
type HurlFile struct { Method string URL url.URL Headers map[string]string Body []byte FileEmbed string MultipartFormData []MultiPartItem MultipartBoundary string // CLI and hurl.json options Config HurlConfig }
type HurlOutput ¶
type HurlOutput struct {
Config HurlConfig
}
func (HurlOutput) OutputRequest ¶
func (h HurlOutput) OutputRequest(hurlFile *HurlFile, req http.Request) error
func (HurlOutput) OutputResponse ¶
func (h HurlOutput) OutputResponse(res http.Response) error
type MultiPartItem ¶ added in v0.3.4
Click to show internal directories.
Click to hide internal directories.