Is it possible to use data from the response header to a POST in a subsequent GET?
Status: Alpha
Brought to you by:
coroberti
From: Ken M. <ke...@sh...> - 2007-11-26 20:46:06
|
Hi, we have a web app that first takes a POST to a generic URL and returns an id in the POST response header. I'd like to use curl-loader to grab that unique id and the subsequently PUT to that id. From a straight curl perspective, it'd look like: =20 Curl -v -X POST <my url> =20 The response header would have a line: =20 < Location: http://<my url>/files/<my id> =20 So, I'd grab <my id> =20 And do: =20 Curl -v -X PUT http://<my url>/files/<my id> -T <file to put> =20 Is there any way to do this? =20 Another option would be to pre-create all the <my id>'s and have them read from a file, but it seems that curl-loader only likes reading username/password pairs from a file. =20 Thanks for any info! |