modtool

package
v19.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package modtool holds conversions between AutoFlow values and the pieces of an HTTP request and response, shared by the built-in modules that call an API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HeaderValue

func HeaderValue(h http.Header) *pkg_autoflow.Value

HeaderValue renders response headers as a dict of header name to list of values.

func RequestHeader

func RequestHeader(v *pkg_autoflow.Value) (http.Header, error)

RequestHeader converts a dict value, whose values are each a single element or a list of elements, into request headers. Header names are canonicalized, so several dict keys can map to the same name; their values are merged in the order the keys appear in the dict.

A nil value yields nil headers: that is what an absent or None argument binds to, so a caller does not have to check for one.

func RequestQuery

func RequestQuery(v *pkg_autoflow.Value) (url.Values, error)

RequestQuery converts a dict value, whose values are each a single element or a list of elements, into URL query parameters.

A nil value yields nil query parameters: that is what an absent or None argument binds to, so a caller does not have to check for one.

func ScalarText

func ScalarText[T ~string | ~[]byte](v *pkg_autoflow.Value) (T, error)

ScalarText extracts the text of a value, which must be a (sensitive) string or (sensitive) bytes.

func StringValue

func StringValue(v *pkg_autoflow.Value) (string, bool)

StringValue extracts the text of a string value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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