WebMethod.Head (“HEAD”) is an enumeration that specifies the HEAD method for HTTP. It is a member of the WebMethod.Type that specifies an HTTP method.
The HEAD method is similar to the GET method, but it retrieves only the headers of a resource, not the resource itself. This is useful when you want to check if a resource exists or to understand its properties without actually downloading it.
You may use the HEAD method when you want to:
- Confirm that a particular resource is available.
- Check if a file has been modified since a specific date without downloading it.
- Determine the size of a file before downloading it.
Consider a case where you want to check whether a specific document is available on a server:
WebAction.Request( WebMethod.Head, "https://api.example.com/documents/456" )
Here, the HEAD request is made to “https://api.example.com/documents/456”. The request aims to check the existence or properties of the document with the ID 456 without actually downloading it.
By using the HEAD method, you can get essential information about a resource without incurring the cost of downloading it.
These enumerations only work in the context of custom connectors.
Other related enumerations are:
Here’s a list of functions that work with WebMethod.Type: