On 11-01-18 03:32 PM, Alain Gaeremynck wrote:
I'm trying to invoke
curl -d `cat data_file.txt` http://somehost/someurl
data_file.txt contains something like
'data={lots of json here}'
The problem is that cat is adding line wraps to a very large bit of text
that's on a single line in the data_file.txt.
Any idea on solving my problem?
Alain
2 things you could try:
1. use --data-urlencode as a switch
2.a. try curl --data @data_file.txt (data must be URL encoded)
2.b. cat data_file.txt | curl --data - http://somehost/someurl (my
syntax may be wrong here).
Jeremy
PS: This may be your issue : "Just be careful so that the content
doesn't contain any = or @ symbols, as that will then make the syntax
match one of the other cases below!" - from man curl
_______________________________________________
mlug mailing list
[email protected]
https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca