How to post to react form with Requests (Python) -


i struggling post javascript/react form pythons requests. understand regular way this

payload = {"user": "me", "password": "12345"} s = requests.session() html = s.post(url, data=payload) ` 

the url part problem, since cannot find in source. source of form looks this:
<form class="login-form" method="post" data-reactid="19"> … </form>
assumed value action parameter but, well, ain't there. tried find url in javascript honest, can't read well.

so question be: how – if @ – can make post requests react formular?

edit:
make question more concise , reflect accepted answer:

if html-form javascript has no obvious url in source posts to, how can find out url?

a form without action= attribute posts current url. since you're dealing react, it's handled action api endpoint behind scenes. watch network tab under developer tools in browser of choice see how it's implemented , url react application talks to.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -