diff --git a/lib/src/Connection.dart b/lib/src/Connection.dart index 538786e..1e2c7b1 100644 --- a/lib/src/Connection.dart +++ b/lib/src/Connection.dart @@ -221,9 +221,9 @@ class Connection { final url = "${client.homeserver}/_matrix${action}"; - Map headers = { - "Content-Type": contentType, - }; + Map headers = {}; + if (type == HTTPType.PUT || type == HTTPType.POST) + headers["Content-Type"] = contentType; if (client.isLogged()) headers["Authorization"] = "Bearer ${client.accessToken}";