October 2017
Intermediate to advanced
370 pages
8h 57m
English
This time, we'll rewrite our form to use the POST method instead of GET, and action-xhr with our new endpoint instead of action (/ch6/signup-xhr.html):
<form method="post" action-xhr="/ch6/signup-xhr.php" target="_top"> <input type="email" name="email" id="email" required> <input type="submit" value="Sign me up!"></form>
For XHR requests, AMP expects a JSON response with the following:
Read now
Unlock full access