curl-library
Re: x-amf + read odds from unibet.com
Date: Wed, 12 Mar 2008 09:11:27 +0100 (CET)
On Wed, 12 Mar 2008, Michael Hecker wrote:
> POST /livebetting/gateway.do HTTP/1.1
...
> Content-type: application/x-amf
> Content-length: 238
>
> So far so good, but I've got no idea how to POST the amf data:
>
> 00000000 00 00 00 00 00 04 00 18 4c 69 76 65 42 65 74 74 LiveBett
> 00000010 69 6e 67 2e 67 65 74 42 65 74 4f 66 66 65 72 73 ing.getBetOffers
> 00000020 00 02 2f 35 00 00 00 17 0a 00 00 00 02 00 3f f0 /5 ?
> 00000030 00 00 00 00 00 00 00 41 cd cf 54 87 00 00 00 00 A T
You use CURLOPT_POSTFIELDS or you set a read callback. This is documented and
there are several examples showing both ways used. Since the data seems binary
(includes zeroes) you need to set CURLOPT_POSTFIELDSIZE if you don't use a
read callback.
You're not asking us for how to generate the specific content you want to post
right? That has nothing to do with (lib)curl's functions or functionality.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2008-03-12