Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Create REST service to read source of website

Hi,

I've touched upon this before, but have still not managed to succeed in getting the data passed to my application.

Basically, I need to be able to read the html code of a website and within the app read sections of the html to further process.

I have setup a rest service and used the following parameters:
URL: website URL
method: GET
Data Type: XML

When I run a test I can see the HTML from the website, all good there.
Obviously the "auto create response" wont work as there is no formatting for this.
So I though I could use some javascript to handle the response.

But I cannot even get the data to map into anything so I can run some javascript on it.

Can someone give me a clue how I can do this please?

regards

Andy.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Create REST service to read source of website

Hi Andy,

The HTML format is different from the XML, so, you can't convert it to that and get Response parameters.

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Create REST service to read source of website

Ah OK, so is there absolutely no way to get at the source html of a website using this platform?

Thanks again

Andy.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Create REST service to read source of website

Hi Andy,

You can manually send a request and get a page.
http://api.jquery.com/jQuery.get/#exa...
In this case, you will need to extract data using jQuery manually.

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Create REST service to read source of website

Wow, thanks for this. J query is not something I've really researched.
Thanks for the link, I obviously have some reading and learning to do.
I really appreciate the help you give to your customers, it is truly fantastic.

Regards

Andy

Return to “Issues”