Search code examples
httptestingbrainbench

Which one of the following is true when creating interfaces that alter data on the server?


I just finished a BrainBench test and for the life of my can't figure out the answer to this question...I don't think there is a correct answer.

Choice 1 PUT requests need to be used; they are not repeatable.

Choice 2 HEAD requests need to be used; they reduce data traffic.

Choice 3 GET requests need to be used; they are easier to send to other users.

Choice 4 POST requests need to be used since GET requests could be inadvertently sent by a search engine

Choice 5 DELETE requests need to be used; they were designed for this use.


Solution

  • I'm not positive on this, but I'm pretty sure its Choice 4.

    Lets say you have a link that goes to /Delete.aspx?id=4, and Google decides to crawl that link. Assuming theres no authorization checks, Google can wipe out your records.

    Edit: Heres an SO discussion on why POSTs are used instead of GETs for actions that alter data.