简体   繁体   中英

Delphi rest and authentication

I have a web .NET service. I can connect this web service from web browsers. If I write service address first web browser ask username and password than service is connected.

If I connect this web service with delphi . There is error message:

Error message is "401 Unauthorized"

I am using:

  • RESTResponse1
  • RESTRequest1
  • RESTClient1 and HTTPBasicAuthenticator 1.
  • HTTPBasicAuthenticator1 has username and password and RestClient add Authenticator.

But I can not connect web service How can I connect it?

To find out the reason for the missing (or wrong) authentication you can use the developer / debug mode in most web browsers. You could also use Wireshark or a HTTP proxy.

Check the response headers of the server. They include information about all supported authentication modes (see RFC 2616 )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM