fetch header type

hi everyone, i am trying to call an api, and the content type is application/x-www-form-urlencoded, the response returns False with an error :
{“error”:“unsupported_grant_type”}
I tested it in postman and it works just fine!

this is how i call it:

fetch("http://example.example.com/token", {
	    method: 'POST',
	    headers: {"Content-Type": "application/x-www-form-urlencoded"},
	    body: JSON.stringify(myData)
	  }).then(function(response) {
	      status = response.status;  
	      response_ok = response.ok; 
	      console.log(response.ok);
	      return response.json();
	  }).then(function(dataObject) {
	  		
	 //  }).catch(function(err) {
	  });

and that’s what i get:
{"error":"unsupported_grant_type"}

Having googled a little, I came across this stackoverflow post.

That leads me to think that the problem is with what’s inside of your myData variable. Specifically, you are probably not sending a grant_type property there, or you’ve set it to a value that your backend does not accept.

I was certain of my parameters, but after discussing it with my backend colleague she decided to handle this herself where she made me another api that deal with the grant_type from the inside and doesn’t require me to do the authorization step. and all works fine now. Thank you.