Command group | Flag affected | Reversible | Execute on client | Platform(s) |
---|---|---|---|---|
External commands | YES | NO | NO | All |
HTTPSetAuthentication (socket, type, username, password) Returns status
Note: The flag is set according to whether Omnis was able to make a call to this external command.
HTTPSetAuthentication provides the parameters needed to authenticate an HTTP request with the server; the command only supports HTTP basic authentication, or no authentication. If you use basic authentication, you are recommended to use a secure connection. Use this command to set up authentication after calling HTTPOpen and before calling HTTPMethod. Note that if you do not want to authenticate the request, a new socket created with HTTPOpen defaults to no authentication, so you do not need to call HTTPSetAuthentication in this case.
Socket is a long integer field containing the socket number of an open HTTP connection.
Type is a long integer with value zero for no authentication, or 1 for basic authentication.
Username is a character field containing the user name for basic authentication.
Password is a character field containing the password for basic authentication.
Status is an Omnis Long Integer field which receives the value zero for success, or an error code < 0 for failure.