X-Git-Url: https://gitweb.ps.run/matrix_esp_thesis/blobdiff_plain/c7aba5979c820958aa08947903afb47ace496a16..8d8ae609f0201ec4640738ff49b768e899695423:/src/matrix_http_mongoose.c 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"