{"action":"created","issue":{"url":"https://api.github.com/repos/SignalR/SignalR/issues/3639","repository_url":"https://api.github.com/repos/SignalR/SignalR","labels_url":"https://api.github.com/repos/SignalR/SignalR/issues/3639/labels{/name}","comments_url":"https://api.github.com/repos/SignalR/SignalR/issues/3639/comments","events_url":"https://api.github.com/repos/SignalR/SignalR/issues/3639/events","html_url":"https://github.com/SignalR/SignalR/issues/3639","id":131993502,"number":3639,"title":".Net clients do not set Content-Type","user":{"login":"TheBlueSky","id":807685,"avatar_url":"https://avatars.githubusercontent.com/u/807685?v=3","gravatar_id":"","url":"https://api.github.com/users/TheBlueSky","html_url":"https://github.com/TheBlueSky","followers_url":"https://api.github.com/users/TheBlueSky/followers","following_url":"https://api.github.com/users/TheBlueSky/following{/other_user}","gists_url":"https://api.github.com/users/TheBlueSky/gists{/gist_id}","starred_url":"https://api.github.com/users/TheBlueSky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheBlueSky/subscriptions","organizations_url":"https://api.github.com/users/TheBlueSky/orgs","repos_url":"https://api.github.com/users/TheBlueSky/repos","events_url":"https://api.github.com/users/TheBlueSky/events{/privacy}","received_events_url":"https://api.github.com/users/TheBlueSky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-02-07T18:07:10Z","updated_at":"2016-07-05T22:55:02Z","closed_at":null,"body":"I created simple ASP.Net 5 (Core) SignalR server that uses SignalR.Server v3.0.0-rc1-final, web application that uses SignalR jQuery plugin v2.2.0, a .Net 4.5 Console application that uses SignalR .Net client v2.2.0, and an Android application that uses Java and Android client that I compiled from the source.\r\nI noticed that Android and web applications were able to connect to the server and send and receive message without issue; however, Console application gets HTTP error 500 (Internal Server Error) from Kestrel.\r\nAfter checking the requests going from Android and Console, I noticed the missing Content-Type HTTP header, so, I checked SignalR .Net client source code and found out that .Net clients, other than .Net 4.0; e.g., .Net 4.5, Portable, and Store, do not set the header.\r\nThe issue is in `Post` methos in \"src\\Microsoft.AspNet.SignalR.Client45\\Http\\DefaultHttpClient.cs\" file. I believe we need to add `requestMessage.Content.Headers.Add(\"Content-Type\", \"application/x-www-form-urlencoded\");` after `if (postData == null) { ... } else { ... }`.\r\nIf this project is not in hibernation, I can create a pull request :)"},"comment":{"url":"https://api.github.com/repos/SignalR/SignalR/issues/comments/230626421","html_url":"https://github.com/SignalR/SignalR/issues/3639#issuecomment-230626421","issue_url":"https://api.github.com/repos/SignalR/SignalR/issues/3639","id":230626421,"user":{"login":"moozzyk","id":1438884,"avatar_url":"https://avatars.githubusercontent.com/u/1438884?v=3","gravatar_id":"","url":"https://api.github.com/users/moozzyk","html_url":"https://github.com/moozzyk","followers_url":"https://api.github.com/users/moozzyk/followers","following_url":"https://api.github.com/users/moozzyk/following{/other_user}","gists_url":"https://api.github.com/users/moozzyk/gists{/gist_id}","starred_url":"https://api.github.com/users/moozzyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moozzyk/subscriptions","organizations_url":"https://api.github.com/users/moozzyk/orgs","repos_url":"https://api.github.com/users/moozzyk/repos","events_url":"https://api.github.com/users/moozzyk/events{/privacy}","received_events_url":"https://api.github.com/users/moozzyk/received_events","type":"User","site_admin":false},"created_at":"2016-07-05T22:55:01Z","updated_at":"2016-07-05T22:55:01Z","body":"Is this only a problem when connecting to a Signalr 3.0 server?"}}
{"actor":{"display_login":"moozzyk"}}