0

Using leaf xnet to make a request, but Im getting the could not get a response from server. Tried using postman and its working fine, but c# is giving me that error.

            var request = new HttpRequest();
            string response = request.Get("XXXX").ToString();
            Console.WriteLine(response);

Leaf.xNet.HttpException: 'Could not receive the message body of the response HTTP-server

I tried making that protocol attribute true, nothing works.

tagog97383
  • 19
  • 5

1 Answers1

0

try to turn to add UserAgent header + put the following code :

Request.IgnoreProtocolError = true
zdlk
  • 21
  • 4