jeudi 9 août 2018

simulate login on webpage with javascript

hi how can i simulate a login on a webpage with react native? If someone has a solution with javascript i will accept it, too

I just want to get the Informations from a Website in my App. I dont want to use a Webview. I just need the HTML code and there i will look which information i will need.

Here is an image with the requests of the login process.

enter image description here

The 302 redirect request has no answer, but in the params i see the passwort and the username from the login form and on the cookies i have this: I have cut the image to half because of security reasons.

enter image description here

This is the header: enter image description here

In the second request is a redirect request, too. There are some Cookie Informations, too.

And the third request (Get request) is successfull. The header looks like this: enter image description here

And the response is the HTML Code. The HTML code is what i want.

My first idea was to copy the curl request and transform it to javascript. https://curl.trillworks.com/ But i dont know how to handle with cookies... Somebody can help me? I thought to use something like request.js or axios




Aucun commentaire:

Enregistrer un commentaire