Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

HEAD is one of the first methods introduced in the HTTP spec, but it is probably one of the lesser known members.  According to the specification, HEAD works exactly like GET but it does not return a body. So, why would anyone use it? First, it is a way to "test the waters" of a GET request without the overhead that this request might produce. Second, HEAD requests are supposed to return the same HTTP Response headers that the a GET request would so this makes , making it easier to anticipate how the body will be returned (e.g., the Content-Type header should still have a valid value, even if the body is empty). Finally, since the HEAD method still requires authentication, it is a great way to "log into" an application without requiring the app to download and endpoint's resource right away.

You may have noticed in the previous screen shots that the GET method displays the HEAD method next to it. This is to indicate that GET and HEAD methods will be enabled or disabled together. Furthermore, all API routines will automatically get a HEAD API signature added below the GET API signature:

Code Block
languagebp
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Endpoint Handlers
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

API contacts.GET
API contacts.HEAD


    Method  = HTTP_Services('GetHTTPRequestMethod')
	// Process normally if the GET method or simply return response headers if the HEAD method.
    .
    .
    .
    .

end api


HAL and URI Templates


4.0.5

More Logging TLC

The more logging gets used the more ways we see how this can be improved. Here is a summary of what we've added:

...