• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Could anybody help me

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am unable to sort out properly where to use get and where post in questions given at page 19 of HFSJ.So please tell me the answers with reasons.

Thanks
Sunil
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Whenever we have to send any kind of data to the server for example form submission we have to use POST method and GET method is used to request for any resource from the server.

I think you should be able to figure out answer to questions on page 19 by yourself.
 
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The GET method is Idempotent in HTTP sepecification means that multiple GET requests doesn't change the state of the server whereas POST is non-Idempotent.

In GET the data is passed in query string which is visible in the address bar of browser, so don't send data through GET which you don't want user to see, like username/password in case of login page, use POST in this case.

Similarly, there are places where you should use GET like in a search page, if you are providing a search page to user where he/she can search things depending upon some keyword or criteria, you should use GET for that so that user can bookmark the page and in future if he/she wants to use the same search criteria he/she can come to it directly whereas if you use POST in this scenerio the search criteria can not be book marked.

These are some of the cases, however now you can think more by yourself
 
Suniljava Sharma
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ali and suchen for quick response.
Just one query is here if i am going back to previous page by using Back arrow(or Alt+left arrow) then which method must be used.
 
Did you ever grow anything in the garden of your mind? - Fred Rogers. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic