abouttreesummaryrefslogcommitdiff
path: root/src/matrix_http_mongoose.c
diff options
context:
space:
mode:
authorPatrick2023-08-26 14:41:39 +0200
committerPatrick2023-08-26 14:41:39 +0200
commit8d8ae609f0201ec4640738ff49b768e899695423 (patch)
tree1e70b0cd59d503fa6b02bd3c84eb84ec46325ff0 /src/matrix_http_mongoose.c
parentc7aba5979c820958aa08947903afb47ace496a16 (diff)
downloadmatrix_esp_thesis-8d8ae609f0201ec4640738ff49b768e899695423.tar.gz
matrix_esp_thesis-8d8ae609f0201ec4640738ff49b768e899695423.zip
able to send encrypted messages :)
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"