× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



HTTPAPI cannot imitate a web browser.   HTTPAPI implements the HTTP network protocol, which is perhaps 1% of what a web browser does.  The rest of the stuff (such as interpreting HTML, CSS, JavaScript, rendering pages, etc) does not exist at all in HTTPAPI.

You could potentially use HTTPAPI to send the same stuff to the server that a web page would've sent, and get back the response, etc.  But interpreting that response and figuring out what the server expects you to do in reaction to the responses that it sends would be entirely up to you.  That's usually quite a bit of work to get right, you have to start by reverse-engineering what the web page does, and then figure out how to do the same in your own code.  For a very simple site, that's not so bad, but for a complex site (which most are today) it is not easy.  And, of course, every time they make a change, you have to change your code, too.  The site owner almost certainly won't provide any support for what you're doing, and in some cases will get angry that you're doing it.

A much better approach would be to use a web service (API) rather than trying to simulate a user at a web page.  These are designed for you to use them this way!


On 4/11/19 12:14 AM, Don Brown wrote:
I remember reading somewhere, possibly a document by Scott Klemment that
HTTPAPI could imitate a person using a browser ... whish I could find that
document.

I have a requirement to collect some information from a public web site
and no web services are available for the content I am looking to
retrieve.

The url is:
https://my.service.nsw.gov.au/MyServiceNSW/index#/rms/freeRegoCheck/details

You can then enter a vehicle registration number and click next. T3580 is
a valid registration number.

EXAMPLE4 uses a WebForm to post values to the page. How do I find the
name of the input for the Registration number on the web page ?

The how do I click the Next button from my program ?

Any comments, links or examples appreciated.

This is NOT a long term solution, I just need to get the details for about
4000 records Once.

Thakns


Don Brown

______________________________________________________________________
This email has been scanned for computer viruses. Although MSD has taken reasonable precautions to ensure no viruses are present in this email, MSD cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
______________________________________________________________________


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.