Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultTimeout = 30 * time.Second
DefaultTimeout bounds a request when the step does not set `timeout`. The zero value of http.Client means "wait forever", which lets a single unresponsive endpoint hold a workflow open until the step timeout fires.
Variables ¶
This section is empty.
Functions ¶
func MarshalBodyIfJSON ¶ added in v1.1.2
MarshalBodyIfJSON converts body to JSON string when Content-Type is application/json Supports map[string]any and []any body types
func ResolveMethodAndURL ¶ added in v0.20.0
ResolveMethodAndURL resolves HTTP method fields and updates the data map Converts method fields like "get", "post" to "method" and "url" fields
Types ¶
type Req ¶
type Req struct {
URL string `map:"url" validate:"required"`
Method string `map:"method" validate:"required"`
Proto string `map:"ver"`
Header map[string]string `map:"headers"`
Body string `map:"body"` // Changed from []byte to string for text data
Timeout string `map:"timeout"`
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.