Documentation ¶
Index ¶
- Constants
- func AsString(x starlark.Value) (string, error)
- type Response
- func (r *Response) HeadersDict() *starlark.Dict
- func (r *Response) JSON(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (r *Response) Struct() *starlarkstruct.Struct
- func (r *Response) Text(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
Constants ¶
View Source
const MAX_BYTES_STDOUT = 100 * 1024 * 1024 // 100MB
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Response ¶
Response represents an HTTP response, wrapping a go http.Response with starlark methods
func (*Response) JSON ¶
func (r *Response) JSON(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)
JSON attempts to parse the response body as JSON
func (*Response) Struct ¶
func (r *Response) Struct() *starlarkstruct.Struct
Struct turns a response into a *starlark.Struct
Click to show internal directories.
Click to hide internal directories.