About Question enthuware.jwpv6.2.1093 :

Moderator: admin

Post Reply
johnlong
Posts: 197
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

About Question enthuware.jwpv6.2.1093 :

Post by johnlong »

Would it be possible to override doPut to receive and process file as asked in the question?

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.1093 :

Post by admin »

Yes, it is probably possible but it is certainly not something that "you would use", which is what the question asks. For the purpose of the exam, doPost is the right answer.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

johnlong
Posts: 197
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

Re: About Question enthuware.jwpv6.2.1093 :

Post by johnlong »

What is the advantage of using doPost instead of doPut in this case?

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.1093 :

Post by admin »

It is not about advantage. It is about how the protocol is designed. HTTP protocol specifies that PUT is used to associate a resource with a URL while POST is used to process data sent by the browser. One can, of course, write a client/server pair that does just the opposite and it would work but that is not the point here.

HTH,
Paul,
If you like our products and services, please help us by posting your review here.

johnlong
Posts: 197
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

Re: About Question enthuware.jwpv6.2.1093 :

Post by johnlong »

Thank you for your explanation!

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests