Added Content-Type header for POST request with HttpContext.

This commit is contained in:
Jonathan Bernard 2014-01-11 18:56:16 -06:00
parent 3929968af1
commit 45f49d393e
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
#Sat, 21 Sep 2013 02:27:46 -0500 #Sat, 11 Jan 2014 18:55:50 -0600
name=jdb-util name=jdb-util
version=2.2 version=2.3
lib.local=true lib.local=true
build.number=8 build.number=0

View File

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