Returning HttpResponse Message the right way
Working with HttpResponseMessage can be tricky. How do you return HttpResponseMessage as string or HttpResponseMessage as Json message.
return new HttpResponseMessage( HttpStatusCode.OK ) {Content = new StringContent( "Your message here" ) };
As for Json message
return new HttpResponseMessage( HttpStatusCode.OK ) {Content = new StringContent( SerializedString, System.Text.Encoding.UTF8, "application/json" ) };
Comments