Skip to main content

prepare_cmd_for_request_parts_and_payload

Function prepare_cmd_for_request_parts_and_payload 

pub fn prepare_cmd_for_request_parts_and_payload(
    parts: &(impl HttpRequestParts + AuthorityInputExt + ProtocolInputExt),
    payload: &Bytes,
) -> PreparedCurlCommand
Available on crate features http and std only.
Expand description

Prepare a shell-independent curl command that receives its payload on stdin.

Non-empty payloads are represented as --data-binary @-; callers must write PreparedCurlCommand::stdin to the spawned child’s piped stdin.