ruby monstas
play

Ruby Monstas Session 20 Agenda Recap HTML Forms HTTP POST - PowerPoint PPT Presentation

Ruby Monstas Session 20 Agenda Recap HTML Forms HTTP POST Development Tools Exercises Recap HTTP: Computing model evolution Client Server Request Response HTTP: Uniform Resource Locator (URL) DOMAIN NAME RESOURCE rubymonstas.ch


  1. Ruby Monstas Session 20

  2. Agenda Recap HTML Forms HTTP POST Development Tools Exercises

  3. Recap

  4. HTTP: Computing model evolution Client Server Request Response

  5. HTTP: Uniform Resource Locator (URL) DOMAIN NAME RESOURCE rubymonstas.ch /curriculum

  6. HTTP: Method & Format REQUEST METHOD FORMAT GET .HTML

  7. Sinatra: Map routes to code Sinatra Request get '/' do 'Hello World' Response end

  8. HTML Forms

  9. HTML Form labels, input fields, submit button

  10. HTML Form

  11. HTML Form < form method="POST"> < p > < label >Input 1 text: < input type="text" name="input1" /> </ label > </ p > < p > < label >Input 4 file: < input type="file" name="input4" /> </ label > </ p > < p > < label >Input 7 number: < input type="number" name="input7" /> </ label > </ p > </ form >

  12. HTML Form < input type="XY" name="UNIQUE_NAME" /> < input type="text" name="some_unique_name1" /> < input type="checkbox" name="some_unique_name2" /> < input type="color" name="some_unique_name3" /> < input type="file" name="some_unique_name4" /> < input type="email" name="some_unique_name5" /> < input type="hidden" name="some_unique_name6" /> < input type="number" name="some_unique_name7" /> < input type="password" name="some_unique_name8" /> < input type="radio" name="some_unique_name9" />

  13. HTML Form Let’s check this in the browser: http://localhost:4567/example_form

  14. HTTP POST

  15. HTTP POST We learned from GET so far There are other verbs, like POST Let’s check this in the browser

  16. Developer Tools (HTTP GET) the request in the developer tools the page we requested (resource) the response rendered by the browser

  17. Developer Tools (HTTP POST)

  18. Developer Tools (HTTP POST)

  19. Developer Tools (HTTP POST)

  20. Developer Tools (HTTP POST) < form method="POST"> < p > < label >Input 1 text: < input type="text" name="input1" /> </ label > </ p > < p > < label >Input 4 file: < input type="file" name="input4" /> </ label > </ p > < p > < label >Input 7 number: < input type="number" name="input7" /> </ label > </ p > </ form >

  21. Time to practice

  22. Resources https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input https://developer.mozilla.org/en/docs/Web/HTML/Element/form https://developer.mozilla.org/en-US/docs/Tools https://developer.mozilla.org/en-US/docs/Web/HTTP https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend