Changing double quotes to single quotes or vice versa in Vim is simple if you have tpope’s surround.vim plugin.

With the plugin installed and your cursor anywhere inside a quoted string press cs followed by the character you want to change and then the character you want to change it to. You can remember this with the mneumonic Change Surrounding.

For example, cs"' with your cursor inside the "Content-Type" string would change it like so:

// from
req.setRequestHeader("Content-Type", "application/json")

// to
req.setRequestHeader('Content-Type', "application/json")

You can then repeat the action for the next one by simply pressing . in place.