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, headers, params=<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: JSONPayload[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, t.Any | list[t.Any] | None][source]

The URL queryparameters 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.