curl-users
Re: Command line curl for UPS pld upload from VMS
Date: Sat, 26 Feb 2011 21:40:53 -0800
On Sat, Feb 26, 2011 at 09:08:44PM +0000, Chris Sharman wrote:
> I've been struggling for a while to post a UPS-specified message to https using
> curl.
>
> UPS (the parcels company) gave me the php script (below)
>
> I've tried:
> $ curl --header "Content-Type: multipart/mixed; boundary=BOUNDARY" -
> --data pld.txt "https://www.pld-certify.ups.com/hapld/tos/kdwhapltos"
>
> and various other variations (using curl 7.14.1 alpha-hp-vms), but I can't
> guess how the curl command line corresponds to the php/curl api.
You're on the right track. The - before the --data option isn't needed,
and you need a @ before the file name to upload, but that should do it:
$ curl --header "Content-Type: multipart/mixed; boundary=BOUNDARY" \
--data @pld.txt "https://www.pld-certify.ups.com/hapld/tos/kdwhapltos"
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-27