4D v14.3HTTP AUTHENTICATE |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
HTTP AUTHENTICATE
HTTP AUTHENTICATE
The HTTP AUTHENTICATE command enables HTTP requests to servers requiring authentication of the client application. The BASIC and DIGEST methods are supported, as well as the presence of a proxy. In the name and password parameters, you pass the id information required (user name and password). This information is encoded and added to the next HTTP request sent using the HTTP Request or HTTP Get command, so you need to call the HTTP AUTHENTICATE command before each HTTP request. The optional authMethod parameter indicates the authentication method to use. You pass one of the following constants, found in the HTTP Client theme:
If you omit the authMethod parameter (or pass 0), you let the program choose the appropriate method to use. In this case, 4D sends an additional request in order to negotiate the authentication method. If you pass the * parameter, this indicates that the authentication information is intended for an HTTP proxy. This setting must be implemented when there is a proxy requiring authentication between the client and the HTTP server. If the server itself is authenticated, a double authentication is necessary. By default, authentication information is reset after each request, so you must use HTTP AUTHENTICATE before each HTTP Request or HTTP Get. However, it is possible to store this information temporarily using an option for the HTTP SET OPTION command. In this case, you no longer have to execute the HTTP AUTHENTICATE command before each request. Examples of requests with authentication: // Authentication on HTTP server in DIGEST mode |
PROPERTIES
Product: 4D
HISTORY
Created: 4D v13 SEE ALSO ARTICLE USAGE
4D Language Reference ( 4D v14 R2) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||