I am trying to set the request header “content-type” to “application/json”.
But when I am submitting the form “content-type” is showing “application/x-www-form-urlencoded” inside request headers
Form tag inside html
<form action="/home" method="POST">
<input name="email" id="email" type="email" placeholder="Your Email">
<input name="password" id="password" type="password" placeholder="Your Password">
<input type="submit" >
</form>
I used inside my handler to set the content type
r.Header.Set("Content-Type", "application/json")