This was the first time I encountered such an error when I was involved in the RESTful web service a couple of times. It’s hard for me to trace the cause of the error, I hope you could help me.
I have this attribute for login service
[WebGet(UriTemplate = "Login?username={username}&password={password}&ip={ip}", ResponseFormat = WebMessageFormat.Json)]
Using a script to use the service:
GET http: // localhost: 3445 / Authenticate / Login? Username = jsm & password = a & ip = 1

Fiddler answer:
[Fiddler] ReadResponse() failed: The server did not return a response for this request.

I'm not sure if this is called Content-type: application/json , because when I try to change it to xml:
[WebGet(UriTemplate = "Login?username={username}&password={password}&ip={ip}", ResponseFormat = WebMessageFormat.Xml)]
This gives me this result:

Peculiar. What have I done wrong? I have to return the json object .. Thanks!
source share