4D v16.3HTTP AUTHENTICATE |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16.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 stored temporarily and reused for each request in the current process. However, it is possible to reset this information after each request using an option set by the HTTP SET OPTION command. In this case, you will have to execute the HTTP AUTHENTICATE command before each call to HTTP Request or HTTP Get. Examples of requests with authentication: // Authentication on HTTP server in DIGEST mode
See also
|
PROPERTIES
Product: 4D HISTORY
Created: 4D v13 ARTICLE USAGE
4D Language Reference ( 4D v16) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||