I am working with this horrible, horrible binary shopping cart program, so can't get to any of the code.
For various reasons I am attempting to post one particular state to this program and it's using cookies to maintain the state. I am reading the cookies fine, but it's not accepting the data because - well, I'm doing something wrong. :-)
Is it not possible to send a cookie header and post data in the same command? If not, how would you supply a cookie header and data via curl?
I've tried quite a few different approaches, here is where I'm at right now (perl program:)
$postdata = qq|curl -H 'Cookie:$cookie;$basket;$ship;' -d '$data' $url|;
$response = `$postdata`;
$cookie, $basket, $ship all have appropriate encoded key-value pairs,
$cookie = "somekey=somevalue";
$data is url-encoded post data that works fine otherwise.
var1=one&var2=two....
I've checked the data, the cookies match it exactly, it just gets an error from the program (as if it's not recognizing the cart.)
Their (paid) support isn't helpful, I'll leave it at that.
As I said I've tried a few other approaches, all but the temporary storage of the cookie - doesn't make a lot of sense since I clearly have the right values in hand.