pcibraro / hawknet

Hawk protocol implementation for .NET
MIT License
114 stars 35 forks source link

I download the simple,and run Example project,First client request and response "Bad mac" #25

Open rustbomber opened 10 years ago

rustbomber commented 10 years ago

var clientHandler = new HawkClientMessageHandler(new HttpClientHandler(), credential, "some-app-data"); var client = new HttpClient(clientHandler);

            var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:8091/api/HelloWorld");
            request.Headers.Host = "localhost";

            var response = client.SendAsync(request).Result;
            string message = response.Content.ReadAsStringAsync().Result;
            Console.WriteLine("Response {0} - Http Status Code {1}", message, response.StatusCode);

Additional: I change url to http://localhost:28290/api/HelloWorld and run Example.Web project,is work well.

rustbomber commented 10 years ago

I catch the info: HawkNet Information: 0 : Normalized String: hawk.1.header 1403852658 1Vd0CA GET /api/HelloWorld localhost 8091


HawkNet Information: 0 : Normalized String: hawk.1.header 1403852658 1Vd0CA GET /api/HelloWorld localhost 80

I found the port is difference,why?