module CurlCommand
Overview
Shared curl command construction used by the curl output builder and the HTML report's copy-as-curl feature.
Defined in:
utils/curl_command.crClass Method Summary
- .build(method : String, url : String, body : String, body_type : String, headers : Array(String), cookies : Array(String)) : String
-
.build_multipart(method : String, url : String, text_fields : Array(Tuple(String, String)), file_fields : Array(Tuple(String, String)), headers : Array(String), cookies : Array(String)) : String
Upload endpoints (
param_type: file) must use-Fso curl sends multipart/form-data. - .shell_quote(str : String) : String
Class Method Detail
def self.build(method : String, url : String, body : String, body_type : String, headers : Array(String), cookies : Array(String)) : String
#
def self.build_multipart(method : String, url : String, text_fields : Array(Tuple(String, String)), file_fields : Array(Tuple(String, String)), headers : Array(String), cookies : Array(String)) : String
#
Upload endpoints (param_type: file) must use -F so curl sends
multipart/form-data. --data-raw cannot carry a file part, and the
previous builders simply dropped every file field — POST /modern.php
printed only name= while -f postman / OAS kept avatar.
file_fields are (name, path_hint); an empty hint uses the field name
as the @filename placeholder (same idea as Postman's empty src).