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
HTTP Request - no parameters
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
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!
Bob
A humble man and PROUD of it!
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]
[email protected]