Page 1 of 1

Create REST service to read source of website

Posted: Wed Oct 09, 2013 3:58 pm
by Andy Parker

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.


Create REST service to read source of website

Posted: Wed Oct 09, 2013 5:14 pm
by Kateryna Grynko

Hi Andy,

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


Create REST service to read source of website

Posted: Wed Oct 09, 2013 6:09 pm
by Andy Parker

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

Thanks again

Andy.


Create REST service to read source of website

Posted: Wed Oct 09, 2013 7:00 pm
by Kateryna Grynko

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.


Create REST service to read source of website

Posted: Wed Oct 09, 2013 7:43 pm
by Andy Parker

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