You can use the -stream, -S flag to make two things happen: However, when colors and formatting are applied, the whole response is buffered and only then processed at once. This allows for streaming and large file downloads without using too much memory. Responses are downloaded and printed in chunks. Accept-Encoding can't be set with -download.
Therefore, bandwidth and time isn’t wasted downloading the body which you don’t care about. Since you are only printing the HTTP headers here, the connection to the server is closed as soon as all the response headers have been received. fieldname), you need to place all such items after the special token - to prevent confusion with -arguments:
If any of the field names or headers starts with a minus (e.g. Often it is necessary to quote the values, e.g. For instance, foo\=bar will become a data key/value pair ( foo= and bar) instead of a URL parameter. You can use \ to escape characters that shouldn’t be used as separators (or parts thereof). Raw request body is a mechanism for passing arbitrary request data. Note that the structured data fields aren’t the only way to specify request data:
For example or With -form, the presence of a file field results in a -multipart request Useful when sending JSON and one or more fields need to be a Boolean, Number, nested Object, or an Array, e.g., meals:='' or pies:= (note the quotes)įile upload fields available with -form, -f and -multipart. The = separator is used.ĭata Fields field=value, data fields to be serialized as a JSON object (default), to be form-encoded (with -form, -f), or to be serialized as multipart/form-data (with -multipart) X-API-Token:123Īppends the given name/value pair as a querystring parameter to the URL.