Posting data with HTTPRequest

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
danielmcl
Newbie
Posts: 2
Joined: Thu Sep 02, 2010 6:28 pm

Posting data with HTTPRequest

Post by danielmcl » Thu Sep 02, 2010 6:55 pm

I have a simple script that writes out any variables posted to it. Using the example below it appears the variables are not being sent either by POST or GET.

Code: Select all

Let>PostData=Hello=World
HTTPRequest>http://localhost/form.asp,,GET,PostData,HTMLResponse
Message>HTMLResponse
I'm running the latest version (12.0.7e), any ideas?

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Thu Sep 02, 2010 9:24 pm

This was tested to work in both 10.1.21 and 12.0.6

Code: Select all

Let>PostData=appid=YahooDemo&query=Madonna&results=4&output=json
HTTPRequest>http://search.yahooapis.com/ImageSearchService/V1/imageSearch,,POST,PostData,HTMLResponse
MessageModal>HTMLResponse

danielmcl
Newbie
Posts: 2
Joined: Thu Sep 02, 2010 6:28 pm

Post by danielmcl » Thu Sep 02, 2010 9:54 pm

Thanks for that example, it pointed me in the right direction to find the culprit. It appears that the method that's sending the http request is setting the encryption type to "multipart/form-data" which is fine for services that are expecting a file upload but the default should be "application/x-www-form-urlencoded". Where's the best place to report a bug?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts