Skip to main content

Module curl

Module curl 

Available on crate features http and std only.
Expand description

Convert HTTP requests with or without their payload into a valid curl command.

Proxy export reads the middleware-visible ProxyRoute. Compose ProxyRoutesLayer after all proxy route selectors and before exporting when inputs may carry an ordered route plan.

Structs§

CurlExportOptions
Policies used while converting an HTTP request into curl arguments.
CurlPayloadRequiresStdin
Error returned when the selected script policies cannot embed a payload losslessly.
PreparedCurlCommand
A curl process command together with bytes that must be written to its stdin.

Enums§

CurlScriptCompatibility
Compatibility target for an exported curl command string.
CurlScriptPayloadMode
How a request payload is referenced by an exported curl command string.

Functions§

cmd_for_request_parts
Create a curl Command for the given HttpRequestParts.
cmd_for_request_parts_and_payload
Create a curl Command for the given HttpRequestParts and payload bytes.
cmd_for_request_parts_and_payload_with_options
Create a curl Command with an inline payload and explicit policies.
cmd_for_request_parts_with_options
Create a curl Command using explicit export policies.
cmd_string_for_request_parts
Create a curl command string for the given HttpRequestParts.
cmd_string_for_request_parts_with_options
Create a curl command string using explicit export policies.
prepare_cmd_for_request_parts_and_payload
Prepare a shell-independent curl command that receives its payload on stdin.
prepare_cmd_for_request_parts_and_payload_with_options
Prepare a shell-independent curl command using explicit export policies.
try_cmd_string_for_request_parts_and_payload
Create a pure curl command string for the given request and inline payload.
try_cmd_string_for_request_parts_and_payload_with_options
Create a curl command string using explicit request and payload policies.