RestSharp - Authorization Header not coming across to WCF REST service

前端 未结 3 727
攒了一身酷
攒了一身酷 2021-02-04 01:30

I am trying to call a locally hosted WCF REST service over HTTPS with basic auth.

This works and the Authorization header comes thru just fine and all is happy:

3条回答
  •  逝去的感伤
    2021-02-04 01:50

    You have to use ParameterType.HttpHeader parameter:

    request.AddParameter("Authorization", "data", ParameterType.HttpHeader);
    

提交回复
热议问题