Ou have some incorrect concepts around these HTTP methods, and HTTP in general.
amit daundkar wrote:i have a small query. We use GET for getting a response and POST to post to server.
Not quite. All requests will result in a response, be they GET, POST, PUT, DELETE, or any other HTTP method.
The difference is in how the methods are to be used.
taken into account the security related and other differences between the two methods,
There is no difference in security between any of the methods. None. At all.
we can still 'GET' a response using the POST method. so why to use GET?
GET is intended for just what is says -- to GET something from the server. GETs should be idempotent -- that is, repeating the same GET over and over again should get the same response.
GETs pass request parameters on the URL.
POSTs can be non-idempotent, that is, return different response results based upon what happens on the server.
POSTs pass request parameters in the request body.