cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: https/post help

From: Roth, Kevin P. <KPRoth_at_MAPLLC.com>
Date: Thu, 31 Jul 2003 08:24:53 -0400

Could there be a -G somewhere in your data.txt file? If it ended up in just the right place, I suppose it could have triggered curl's '--get' mode, where -d (POST) request gets turned into a GET request instead...

I believe your script is slightly flawed though. Instead of:

  data=`cat $1`
  ...
  curl ... -d "@$data"

I think you actually need:

  curl ... -d "@$1"

The @-sign tells curl to do the reading from the file, so your cat command is unnecessary.

You might also need to use --data-binary (if you require preserving newlines and other less-than-printable characters).

- Kevin

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-07-31