I want to write a program which will log in to squareup.com. So for this I need to know where the form is located and to where is it submitted.
So the form is located at https://squareup.com/login, and the source code contains the following:
<form accept-charset="UTF-8" action="/mp/login"
class="signin-page-form " method="post" novalidate="novalidate">
As much as I understand this means the submition URL is located at squareup.com/mp/login. Yet when I try this URL in a browser I get the 404 error. What am I not doing right?
action
attribute contains a root-relative URL. What you are suggesting would only occur if the form was located atexample.com/login/
(note the trailing slash) and the submission URL wasmp/login
(note the omission of the slash prefix - a relative URL).authenticity_token
that varies per session) that you would also need to satisfy before a form submission would be successful.