data-urlencode.d 1.3 KB

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