Useful when sending JSON and one or more fields need to be a Boolean, Number, nested Object, or an Array, e.g., meals:='' or pies:= (note the quotes)įile upload fields available with -form, -f and -multipart. Request data fields to be serialized as a JSON object (default), to be form-encoded (with -form, -f), or to be serialized as multipart/form-data (with -multipart) X-API-Token:123Īppends the given name/value pair as a querystring parameter to the URL. As an example, your form data will be shown as follows in the Chrome Network tab.Arbitrary HTTP header, e.g. HTTP requests are never displayed to the user (if you want to see them, you need to use tools such as the Firefox Network Monitor or the Chrome Developer Tools). How the data is sent depends on the method attribute. The server then responds, generally handling the data and loading the URL defined by the action attribute, causing a new page load (or a refresh of the existing page, if the action points to the same page). The action value should be a file on the server that can handle the incoming data, including ensuring server-side validation. The names and values of the non-file form controls are sent to the server as name=value pairs joined with ampersands. On the other hand, if the form is hosted on a secure page but you specify an insecure HTTP URL with the action attribute, all browsers display a security warning to the user each time they try to send data because the data will not be encrypted. When you do this, the data is encrypted along with the rest of the request, even if the form itself is hosted on an insecure page accessed using HTTP. Note: It's possible to specify a URL that uses the HTTPS (secure HTTP) protocol.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |