Sunday, December 25, 2022

HTTP Request Methods - DOT 3P HCG

 

Today, in the morning session with a mentee, she asked, "I have difficulty in remembering all the HTTP request methods and what it does. How can I make it simple?"  

I had the same question in the end of 2009 when I started testing the applications built using the HTTP.


Learning, and Registering the Learning

When I read, I forget it, because it is not yet registered in me consciously.  How to learn in a way so that it registers in me? I had this question.  Especially, when I started my career, I had this challenge.

In the college days, I had formed a tricks and hacks to remember and the mnemonic was one of them.  In 2008, I came across mnemonics in Software Testing.  I saw the mnemonic used by practitioners in Software Testing as one of the learning techniques and to register and retrieve the learning.

I repeat my learning in multiple approaches until I understand a concept. Then I form a layer where I make it simple for me to register it, in me, and to retrieve.

I applied the same with the HTTP request methods.  It became simple to me to recall and use it in my test designs when needed.


DOT 3P HCG

I helped myself by framing the mnemonic DOT 3P HCG in 2010.  I had difficulty in recalling the HGC part. For this, I said to myself -- head, chest, and gut.  That HCG became smooth in registering.  Finally, I could recall all the HTTP request methods with this mnemonic.

DOT 3P HCG stands for:

  • D: DELETE
    • to delete the resource specified
  • O: OPTIONS
    • describes the communication options for the targeted source
  • T: TRACE
    • used for diagnostic purpose and does a loop-back test along the path to target resource

  • P: POST
    • to submit an entity to specified resource
  • P: PUT
    • to upload/update an entity that is saved on server at a specified endpoint
  • P: PATCH
    • to do a partial modification to a resource

  • H: HEAD
    • Ask for a response which is identical to GET but without a response body
      • For example, fetching the expiry date in a header as a response so that it can be used in the next request's header or a payload
  • C: CONNECT
    • To establish a tunnel with a endpoint or server for communication
  • G: GET
    • To request a representation (an information copy) of specified resource


As the HTTP request methods name are verbal, I can recall easily the purpose of each method.  I shared the same today with a mentee.  She could register it in a minute and recall these HTTP request methods and its purpose.

She is happy and says it is so simple now to recall the HTTP methods and its purpose.



No comments:

Post a Comment

Please, do write your comment on the read information. Thank you.