[Connection] Content-Type only in PUT and POST
This commit is contained in:
		
							parent
							
								
									dee3aad69d
								
							
						
					
					
						commit
						9d4b3bbc18
					
				|  | @ -221,9 +221,9 @@ class Connection { | ||||||
| 
 | 
 | ||||||
|     final url = "${client.homeserver}/_matrix${action}"; |     final url = "${client.homeserver}/_matrix${action}"; | ||||||
| 
 | 
 | ||||||
|     Map<String, String> headers = { |     Map<String, String> headers = {}; | ||||||
|       "Content-Type": contentType, |     if (type == HTTPType.PUT || type == HTTPType.POST) | ||||||
|     }; |       headers["Content-Type"] = contentType; | ||||||
|     if (client.isLogged()) |     if (client.isLogged()) | ||||||
|       headers["Authorization"] = "Bearer ${client.accessToken}"; |       headers["Authorization"] = "Bearer ${client.accessToken}"; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue