With the following command "call curlsetopt(curl, 'HTTPPOSTDATA', 'data.'" I keep receiving a "cURL error: 5 - INCOMPLETE"
Does anyone have an example of how to use this command properly?
This may help. This example uses a form containing 2 fields (upfile and note) and the target page should be in variable url.:
call CurlVariable 'DEBUG',255
Call CurlSetOpt curl, 'VERBOSE', '1'
Call CurlSetopt curl, 'URL', url
Call CurlSetOpt curl, 'HTTPPOST', '1'
field.0 = 2
field.1 = 'upfile=boot.ini'
field.2 = 'note=curl'
Call CurlSetOpt curl, 'HTTPPOSTFIELDS', 'FIELD.'
Call CurlPerform curl
If you are looking for file upload, I've been working with Mark on an enhancment - I can post details.
Thanks a lot Mike:
I'm afraid I already tried that, though it works fine I'm trying to send a raw datastream rather than fields.
However I've gotten it to work sort of with the following:
call curlformadd curl, 'FILE', 'Incident', 'text/xml', xmlFile
call curlsetopt curl, 'HTTPPOSTFORM', 1
call curlsetopt curl, 'URL', site
call curlperform curl
call curlformfree curl
Seems to work fine.
Thanks for your help.
It seems that Mark has put the new form handling in already ;-).
Unfortunately I just found out that a mult-part form is not acceptable to the user.
I'm sure that the HTTPPOSTDATA function is the one I need .
Any word on why I get an INCOMPLETE with <call curlsetopt curl, 'HTTPPOSTDATA', 'data.'>
What I'm really looking for is a way to post data without a form. Just posting the raw data stream.
Is this possible?
Log in to post a comment.