singer_sdk.streams.rest.HTTPRequest

class singer_sdk.streams.rest.HTTPRequest[source]

HTTP request for a stream.

Added in version NEXT_VERSION.

__init__(url, method='GET', params=<factory>, headers=<factory>, data=None, safe_query_chars='')[source]
Parameters:
Return type:

None

encode_params()[source]

Encode parameters as a string.

Constructs a string of URL parameters for the request. Uses urllib.parse.urlencode() to encode the parameters.

Returns:

A string of encoded parameters.

Return type:

str

data: Iterable[bytes] | str | bytes | list[tuple[Any, Any]] | tuple[tuple[Any, Any]] | Mapping[str, Any] | None[source]

The data of the request.

headers: dict[str, str][source]

The headers of the request.

method: str[source]

The method of the request.

params: dict[str, Any | list[Any] | None][source]

The URL query parameters of the request.

safe_query_chars: str[source]

ASCII characters that should not be quoted when encoding URL parameters.

url: str[source]

The URL of the request.