Documentation
¶
Index ¶
- Constants
- type Auth
- type BasicAuth
- type Body
- type FormData
- type HeaderValues
- type Headers
- type Profile
- type Request
- type RequestMold
- func (r *RequestMold) ChangePreviousReq(prevReq string)
- func (r *RequestMold) Clone() RequestMold
- func (r *RequestMold) DeleteFromFS() bool
- func (r *RequestMold) Method() string
- func (r *RequestMold) Output() string
- func (r *RequestMold) PreviousReq() string
- func (r *RequestMold) Raw() string
- func (r *RequestMold) Url() string
- type Response
- type ScriptableRequest
- type TraceInfo
- type YamlRequest
Constants ¶
View Source
const CONTENT_TYPE_APPLICATION_JSON = "application/json"
View Source
const CONTENT_TYPE_APPLICATION_XML = "application/xml"
View Source
const CONTENT_TYPE_FORM_URLENCODED = "application/x-www-form-urlencoded"
View Source
const CONTENT_TYPE_LUA = "lua"
View Source
const CONTENT_TYPE_MULTIPART_FORM = "multipart/form-data"
View Source
const CONTENT_TYPE_PLAINTEXT = "text/plain"
View Source
const CONTENT_TYPE_STARLARK = "star"
View Source
const CONTENT_TYPE_TEXT_HTML = "text/html"
View Source
const CONTENT_TYPE_YAML = "yaml"
View Source
const HEADER_NAME_AUTHORIZATION = "Authorization"
View Source
const HEADER_NAME_CONTENT_TYPE = "Content-Type"
View Source
const HEADER_VALUE_BASIC_AUTH = "Basic"
View Source
const HEADER_VALUE_BEARER_AUTH = "Bearer"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeaderValues ¶
type HeaderValues []string
func (HeaderValues) MarshalYAML ¶
func (headerValues HeaderValues) MarshalYAML() (interface{}, error)
func (*HeaderValues) ToString ¶
func (headerValues *HeaderValues) ToString() string
func (*HeaderValues) UnmarshalYAML ¶
func (headerValues *HeaderValues) UnmarshalYAML(node *yaml.Node) error
type Profile ¶
type Profile struct {
Name string
Variables map[string]string
Raw string
Root string
Filename string
HasPublicProfile bool
HasPrivateProfile bool
}
func (*Profile) DeleteFromFS ¶
func (*Profile) IsDefaultPrivateProfile ¶
func (*Profile) IsDefaultProfile ¶
func (*Profile) IsPrivateProfile ¶
type Request ¶
type Request struct {
Headers Headers
Options map[string]interface{}
Body Body
Url string
Method string
Output string
}
func (*Request) ContentType ¶
func (*Request) HasBodyAsMap ¶
func (*Request) IsMultipartForm ¶
type RequestMold ¶
type RequestMold struct {
Yaml *YamlRequest
Scriptable *ScriptableRequest
Type string
Root string
Name string
Filename string
}
func (*RequestMold) ChangePreviousReq ¶
func (r *RequestMold) ChangePreviousReq(prevReq string)
* NOTE: assumes previous request is set before; if previous request is not set, this can't add it to the raw versions
func (*RequestMold) Clone ¶
func (r *RequestMold) Clone() RequestMold
func (*RequestMold) DeleteFromFS ¶
func (r *RequestMold) DeleteFromFS() bool
func (*RequestMold) Method ¶
func (r *RequestMold) Method() string
func (*RequestMold) Output ¶
func (r *RequestMold) Output() string
func (*RequestMold) PreviousReq ¶
func (r *RequestMold) PreviousReq() string
func (*RequestMold) Raw ¶
func (r *RequestMold) Raw() string
func (*RequestMold) Url ¶
func (r *RequestMold) Url() string
type Response ¶
type Response struct {
Headers map[string]HeaderValues
Body []byte
Status string
StatusCode int
Proto string
Size int64
ReceivedAt time.Time
Time time.Duration
TraceInfo TraceInfo
Options map[string]interface{}
Request Request
RequestName string
}
func (*Response) HeadersAsMapString ¶
type ScriptableRequest ¶
type ScriptableRequest struct {
Script string
}
type TraceInfo ¶
type TraceInfo struct {
IsConnReused bool
IsConnWasIdle bool
DNSLookup time.Duration
ConnTime time.Duration
TCPConnTime time.Duration
TLSHandshake time.Duration
ServerTime time.Duration
ResponseTime time.Duration
TotalTime time.Duration
ConnIdleTime time.Duration
RequestAttempt int
RemoteAddr string
}
type YamlRequest ¶
type YamlRequest struct {
PrevReq string `yaml:"prev_req,omitempty"`
Url string `yaml:"url"`
Method string `yaml:"method"`
Headers Headers `yaml:"headers,omitempty"`
Body Body `yaml:"body,omitempty"`
Output string `yaml:"output,omitempty"`
Options map[string]interface{} `yaml:"options,omitempty"`
Raw string `yaml:"raw,omitempty"`
Auth Auth `yaml:"auth,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.