abouttreesummaryrefslogcommitdiff
path: root/src/matrix_http_mongoose.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/matrix_http_mongoose.c')
-rw-r--r--src/matrix_http_mongoose.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/matrix_http_mongoose.c b/src/matrix_http_mongoose.c
index a514f72..b9b2ca3 100644
--- a/src/matrix_http_mongoose.c
+++ b/src/matrix_http_mongoose.c
@@ -132,6 +132,15 @@ MatrixHttpGet(
else
authorizationHeader[0] = '\0';
+ printf(
+ "GET %s HTTP/1.1\r\n"
+ "Host: %.*s\r\n"
+ "%s"
+ "\r\n",
+ url,
+ host.len, host.ptr,
+ authorizationHeader);
+
mg_printf(conn->connection,
"GET %s HTTP/1.1\r\n"
"Host: %.*s\r\n"
@@ -173,6 +182,21 @@ MatrixHttpPost(
else
authorizationHeader[0] = '\0';
+ printf(
+ "POST %s HTTP/1.0\r\n"
+ "Host: %.*s\r\n"
+ "%s"
+ "Content-Type: application/json\r\n"
+ "Content-Length: %d\r\n"
+ "\r\n"
+ "%s"
+ "\r\n",
+ url,
+ host.len, host.ptr,
+ authorizationHeader,
+ strlen(requestBuffer),
+ requestBuffer);
+
mg_printf(conn->connection,
"POST %s HTTP/1.0\r\n"
"Host: %.*s\r\n"
@@ -220,6 +244,22 @@ MatrixHttpPut(
else
authorizationHeader[0] = '\0';
+
+ printf(
+ "PUT %s HTTP/1.0\r\n"
+ "Host: %.*s\r\n"
+ "%s"
+ "Content-Type: application/json\r\n"
+ "Content-Length: %d\r\n"
+ "\r\n"
+ "%s"
+ "\r\n",
+ url,
+ host.len, host.ptr,
+ authorizationHeader,
+ strlen(requestBuffer),
+ requestBuffer);
+
mg_printf(conn->connection,
"PUT %s HTTP/1.0\r\n"
"Host: %.*s\r\n"