How can I POST JSON data with helium scraper?

Here you can ask anything related to JavaScript as applied to Helium Scraper.
Post Reply
harryh
Posts: 1
Joined: Sun Jan 06, 2013 4:40 am

How can I POST JSON data with helium scraper?

Post by harryh » Sun Jan 06, 2013 4:44 am

Hi Juan,

I need to POST a JSON data request to the server. If I was doing it with curl, it would look like this:

curl -i -X POST -k -H "Accept: application/json" -H "Content-Type: application/json; charset=utf-8" https://sitehere.com/search/searching.json --data '{"searchString":"","address": {"latitude":55,"longitude":-3},"page":0}'

I then get a JSON return to parse. How can I do this with HS?

Thanks

webmaster
Site Admin
Posts: 521
Joined: Mon Dec 06, 2010 8:39 am
Contact:

Re: How can I POST JSON data with helium scraper?

Post by webmaster » Thu Jan 10, 2013 2:47 pm

Take a look at the WebRequest method of the Utils object. You can find the documentation at Help -> Documentation and then Actions -> Actions List -> Execute JavaScript -> Class List -> UtilsObject.
Juan Soldi
The Helium Scraper Team

Post Reply