• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Another tough question

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which two are true about the HTTP POST method? (Choose two)
A. POST requests are faster.
B. It supports multipart MIME requests.
C. Request data is sent in a separate content block.
D. Parameters are accessible using the getQueryString method of the
HttpServletRequest interface.
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by green hand:
Which two are true about the HTTP POST method? (Choose two)
A. POST requests are faster.
B. It supports multipart MIME requests.
C. Request data is sent in a separate content block.
D. Parameters are accessible using the getQueryString method of the
HttpServletRequest interface.


I think B, C.
I dont know whether a POST request is faster than a GET request. In the aspect of the limitation, since GET can only send 255 words data, while POST can send, in theory, unlimited data, POST should be slower in this sense.
D is incorrect because only GET requests use query string.
Nick
 
green hand
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not clear about C, can you elaborate more, thanks.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since POST request data can be sent in multipart, for example, the form data, and the upload file information, and thus, they are sent in 2 different content blocks to the server.
Nick
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I forgot the exact terminology
but what happens is the POST data(stream data) sits in a sperate block
in the response header.
I think thats what the 'content' in the question meant
Thanks
Sudhir
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by green hand:
Which two are true about the HTTP POST method? (Choose two)
A. POST requests are faster.
B. It supports multipart MIME requests.
C. Request data is sent in a separate content block.
D. Parameters are accessible using the getQueryString method of the
HttpServletRequest interface.


Well, I'll work backwards; A. is wrong since its not actually compared to any other request type. E.g. POST is slower on average than a GET (which is what the other posters are trying to say) but I think a HEAD request will beat them all.
D. is wrong because you can't get the parameters out of the query string (I don't think they are there, they are in a separate block, for POST requests).
So by default, B. and C. must be correct answers.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic