Merge branch 'http-fix-contenttype' into 'master'
[Connection] Content-Type only in PUT and POST See merge request famedly/famedlysdk!100
This commit is contained in:
commit
b219cc8b5e
|
@ -221,9 +221,9 @@ class Connection {
|
|||
|
||||
final url = "${client.homeserver}/_matrix${action}";
|
||||
|
||||
Map<String, String> headers = {
|
||||
"Content-Type": contentType,
|
||||
};
|
||||
Map<String, String> headers = {};
|
||||
if (type == HTTPType.PUT || type == HTTPType.POST)
|
||||
headers["Content-Type"] = contentType;
|
||||
if (client.isLogged())
|
||||
headers["Authorization"] = "Bearer ${client.accessToken}";
|
||||
|
||||
|
|
Loading…
Reference in a new issue