|
ID: 30314, XE8 HTTP Basic Access Authentication
Example shows using the new RAD Studio XE8 native HTTP Client Libraries for HTTP Basic Authentication.
|
Download
| Details
|
|
FTP
download also available
|
|
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
|
To download this, you must have registered:
|
For Delphi, Version 16.0
to 16.0
598 downloads
Copyright: All rights reserved
Terms of use: Embarcadero use at your own risk disclaimer
Size: 9,612 bytes
Updated on Fri, 24 Jul 2015 17:21:19 GMT
Originally uploaded on Fri, 24 Jul 2015 17:21:10 GMT
SHA1 Hash: A22A3341126C96DAD3B8917D8D4FD4DBD6C6F8BE
MD5 Hash: D367C341F8D77AF6BF49F194AEABEDCB
|
Explore the files in this upload
File Exploration is Disabled
We're sorry, but errors in the uploaded zip file prevent it from being explored.
The error generated by the Zip attachment is:
You may still be able to repair the zip file contents if you download the entire zip locally. You may also want to ask the author to repost the attachment.
|
Description
|
Example shows using the new RAD Studio XE8 native HTTP Client Libraries for HTTP Basic Authentication.
HTTP Basic Auth (or Basic access authentication) is a widely used protocol for simple username/password authentication, for example, when your web browsers prompts you for credentials.
Using the new RAD Studio XE8 native HTTP CLient Libraries, when you send an HTTP request to a server that requires HTTP basic access authentication, the OnAuthEvent of your HTTP client object occurs.
To submit your access credentials, you provide an event handler for this event and, if the value of the second parameter that the event handler receives (AnAuthTarget) is TAuthTargetType.Server, then you fill the AUserName and APassword variables with your username and password for HTTP access.
The example uses an IIS Server with HTTP Basic Authentication Enabled.
A DataSnap REST Server as an ISAPI DLL is deployed on the IIS.
If your access credentials are incorrect, the server returns a StatusCode= 401 and its StatusText=Unauthorized.
And your LResponse.ContentAsString output gives a message like this:
"This error occurs when either the username or password supplied to IIS is invalid, or when IIS cannot use the username and password to authenticate the user."
If your access credentials are correct, the server returns information on the DataSnap REST Server.
|
|

Server Response from: ETNACDC04
|
Connect with Us