HTTP Request - no parameters

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
jwmct
Newbie
Posts: 2
Joined: Fri May 21, 2004 6:18 pm

HTTP Request - no parameters

Post by jwmct » Fri May 21, 2004 6:22 pm

I want to open and run an ASP page using HTTPRequest, but there are no input parameters. Should I use Post or Get? What to do about the parameters?

Thanks

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri May 21, 2004 8:23 pm

Depends on what you want to do. From the Help section, version 7.2.050:
HTTPRequest>URL,[LocalFilename],Method,[POST_Data],Result_Variable[,ProxyServer,ProxyPort]

Retrieves a web document via the HTTP protocol using either GET or POST methods.

URL: URL of document to retrieve
LocalFileName: Optional (may be left blank) - local file to save response to.
Method: GET or POST
Post_Data: Data to Post to URL if using POST method. Use name=value pairs separated by '&'. See example below.
Result_Variable: Stores result of operation. If successful this will contain the HTML returned. Otherwise it will contain an error message.
ProxyServer: Optional - if using a proxy server set this to domain or IP address of proxy server.
ProxyPort: Optional - if using a proxy server, set to port number of proxy server.

Abbreviation : HTT

Example

The following line does a simple GET request and saves the resulting HTML to a variable called HTMLResponse:

HTTPRequest>http://www.mjtnet.com,,GET,,HTMLResponse

The following line does the same thing but also saves the output to a file:

HTTPRequest>http://www.mjtnet.com,d:\HTML\mjtnet.html,GET,,HTMLResponse

This demonstrates a POST operation, sending name=value pairs to the page:

Let>PostData=email=[email protected]&name=Joe Bloggs
HTTPRequest>http://www.someplace.com/someform.html, ... MLResponse
Last edited by Bob Hansen on Fri May 21, 2004 9:32 pm, edited 1 time in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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

Post by support » Fri May 21, 2004 9:19 pm

If you aren't POSTing any data to the page and just want to open it then you can just use GET and ignore the data section. But POST would work too.
MJT Net Support
[email protected]

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