data-urlencode.d 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. Long: data-urlencode
  2. Arg: <data>
  3. Help: HTTP POST data url encoded
  4. Protocols: HTTP
  5. See-also: data data-raw
  6. Added: 7.18.0
  7. Category: http post upload
  8. ---
  9. This posts data, similar to the other --data options with the exception
  10. that this performs URL-encoding.
  11. To be CGI-compliant, the <data> part should begin with a \fIname\fP followed
  12. by a separator and a content specification. The <data> part can be passed to
  13. curl using one of the following syntaxes:
  14. .RS
  15. .IP "content"
  16. This will make curl URL-encode the content and pass that on. Just be careful
  17. so that the content doesn't contain any = or @ symbols, as that will then make
  18. the syntax match one of the other cases below!
  19. .IP "=content"
  20. This will make curl URL-encode the content and pass that on. The preceding =
  21. symbol is not included in the data.
  22. .IP "name=content"
  23. This will make curl URL-encode the content part and pass that on. Note that
  24. the name part is expected to be URL-encoded already.
  25. .IP "@filename"
  26. This will make curl load data from the given file (including any newlines),
  27. URL-encode that data and pass it on in the POST.
  28. .IP "name@filename"
  29. This will make curl load data from the given file (including any newlines),
  30. URL-encode that data and pass it on in the POST. The name part gets an equal
  31. sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
  32. name is expected to be URL-encoded already.
  33. .RE