Strange failure of ajax request with firefox 51

Hello,
my addon sends some data to the server using the sdk module Request.
The code:
let req = request({
url: url,
headers: {
"Content-Type": "application/json",
"Accept": "application/json"
},
content: JSON.stringify(json),
onComplete: (response) => {...}
});
req.post();

Until to Firefox version 49 all worked well. After updating to Firefox 51 the request fails. Checking the http request headers while sending it seems the problem is that application/json does not replace the default one but is appended to it:
Content-Type: "application/x-www-form-urlencoded, application/json"
After searching and found nothing about it, my question is: someone has encountered the same problem? It could be a firefox bug? Or what else?
Thanks.

@claudio2: I’ve got the same error. Maybe it’s a Firefox’s bug.