Hi:
What I am trying to do is use the google app eng URL fetcher service to
access a HTTPS url but before I can arrive to the page I need I first have
to post login details to the site and then I want to navigate to the page
where my data is.
Basically I need to authenticate to the site using my login details and then
I want to retrieve another page from the same site which I only access after
I have logged in. How can I do this using URL fetcher service ?
This is the code i am using for the moment.
URL url = *new* URL("MY_HTTPS_URL");
URLFetchService urlFetchService= URLFetchServiceFactory.*getURLFetchService*();
HTTPRequest httpRequest = *new* HTTPRequest(url,HTTPMethod.*POST*, *
validateCertificate*());
httpRequest.setPayload("login=mylogin&password=mypassword&action=login"
.getBytes());
HTTPResponse response = urlFetchService.fetch(httpRequest);
httpRequest = *new* HTTPRequest(url,HTTPMethod.*POST*,
*validateCertificate*());
httpRequest.setPayload("action=summary".getBytes());
response = urlFetchService.fetch(httpRequest);
Any help appreciated.
Thank you.
cyberalgo
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.