views:

30

answers:

1

I am working on a wp7 app and I want to make an https call (sign-in and then post ) to a website which does not have an REST API. So I will have to use it just like a browser adding headers to the https sign in call and parsing the resulting data get the Cookie data and unique id assigned extra and pass that on to a subsequent https calls I make.

Can someone please point me to best way to do this ? Pointers to some samples that comes close to this would be helpful.

thanks

+2  A: 

If the site in question doesn't prevent CSRF you could just submit form data to it directly. If it does, you're going to need to screen scrape the forms for the website, then populate the necessary fileds and then submit.

If you have control over the site, you'll probably be better off in the long run and be less vulnerable to changes to the site.

If it's not your site, be sure to check permission from the site owner about automating logging in. You also need to be very careful about what you do with regard to the users login credentials.

Matt Lacey