Support... Need help with HTTPRequest

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Eric D
Junior Coder
Posts: 27
Joined: Thu Sep 19, 2002 6:08 pm
Location: Orange County, CA

Support... Need help with HTTPRequest

Post by Eric D » Mon Apr 14, 2003 4:42 pm

Hello,

Does the HTTPRequest use URL Encoding on my name=value pairs? Is there a way I can see what the final outgoing data looks like. I am having trouble posting to URL and it must have proper URL encoding to work. example: space = %20

Thanks
Eric

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Mon Apr 14, 2003 5:48 pm

Hi,

You would need to encode the URL data yourself. You can do this using the VBScript Escape function:

VBSTART
VBEND
VBEval>Escape("parm1=someval with space&parm2=etcetc"),URLPath
MJT Net Support
[email protected]

Eric D
Junior Coder
Posts: 27
Joined: Thu Sep 19, 2002 6:08 pm
Location: Orange County, CA

Post by Eric D » Mon Apr 14, 2003 7:16 pm

Must I only post to html pages? Can I also post to asp or asmx type pages.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Mon Apr 14, 2003 7:43 pm

Hi,

Of course you can - you can post to any http resource.
MJT Net Support
[email protected]

Eric D
Junior Coder
Posts: 27
Joined: Thu Sep 19, 2002 6:08 pm
Location: Orange County, CA

Post by Eric D » Mon Apr 14, 2003 8:19 pm

support wrote:Hi,

Of course you can - you can post to any http resource.
Thanks very much for the quick response. I am still having trouble with the HTTP request command.

When I use a browser I can definately see the URL but when I try to use the HTTP Request I get a 404 not found error. Any suggestions on what I can do to trouble shoot this. I must be missing something. I think I don't understand how the HTTP Request works in MacroScheduler, for example does MS include the ? between the URL and Name Value Pairs? Hmmm anyway here is my code.


HTTPRequest>http://iis-comm-d1/home.html,,Get,,HTMLResponse

or

Let>PostData=loan_number=%loan_number%
HTTPRequest>http://iis-comm-d1/home.html,,Post,%Pos ... MLResponse
MessageModal>HTMLResponse



These are obviously internal servers so you cannot hit them from the outside but do you see anything wrong with my code? I can directly paste this url into my browser and it works fine. Thanks for your help.

Eric

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Mon Apr 14, 2003 8:29 pm

Hi,

If you're doing a GET then you should include the name=value pairs on the URL:

HTTPRequest>http://www.someserver.com?name=value,,GET,,Result

Result will contain the HTML.
MJT Net Support
[email protected]

Guest

Post by Guest » Tue Apr 15, 2003 12:38 am

support wrote:Hi,

If you're doing a GET then you should include the name=value pairs on the URL:

HTTPRequest>http://www.someserver.com?name=value,,GET,,Result

Result will contain the HTML.
Got it to work... thanks. :D

Is there a way I can adjust the timeout time to on the response coming back?

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