Create Book Request:
curl localhost:8080/create_book --include --header "Content-Type: application/json" -d @body.json --request "POST"
StatusFound mat karna it redirects URI to somewhere else StatusOK karna
HTTP 302 The HTTP response status code 302 Found is a common way of performing URL redirection. The HTTP/1.0 specification initially defined this code, and gave it the description phrase "Moved Temporarily" rather than "Found". An HTTP response with this status code will additionally provide a URL in the header field Location.
The Param Function: Plucking Values from URL Parameters urlParamValue := c.Param("key")
The Query Function: Reeling Data from the URL Query String queryParamValue := c.Query("key") On the other hand, when we talk about the Query method, we refer to the retrieval of query parameters from the URL. These parameters are typically found after the “?” in a URL and can be used to filter or customize the response. For example, in the URL http://example.com/search?key=value.
PATCH: Patch request says that we would only send the data that we need to modify without modifying or affecting other parts of the data. Ex: if we need to update only the first name, we pass only the first name.