Class 13 Reading - Ginsusamurai/seattle-301d58 GitHub Wiki

web methods

action attribute

  • where the data is sent to
    • <form action="https://example.com"> or to /somewhere_else local
  • if not populated <form> sends to the same page it is on
  • if yo use https everything is encrypted, even if hosted on a http page
    • if hosted on a https page and go to a http, then it will ask for permission each time
  • when the data is sent over the wire, non-file form controls are ?name1=val1&name2=val2

method attribute

  • GET
    • empty body on the request
    • if a form sent with GET, data added on the URL
    • url?key=val&pairs=here
  • POST
    • data sent on the body of request
    • content-length indicates body size
    • content-type is type of resource
  • viewing http requests
    • use the network tab to intercept and view
    • php can intercept and use the URL to display the data
    • can't do this locally. you'll need a running PHP server to test
⚠️ **GitHub.com Fallback** ⚠️