Added Content-Type header for POST request with HttpContext.

This commit is contained in:
Jonathan Bernard committed 2014-01-11 18:56:16 -06:00
1 parent 3929968af1
commit 45f49d393e
2 files changed
+5 -5

No files matched your search

@@ -47,9 +47,9 @@ public class HttpContext {
message.append("\r\n") }
if (request) {
def jsonRequestBuilder = new JsonBuilder(request)
String requestBody = jsonRequestBuilder.toString()
String requestBody = new JsonBuilder(request).toString()
message.append("Content-Type: application/json\r\n")
message.append("Content-Length: ")
message.append(requestBody.length())
message.append("\r\n\r\n")