Publicar solicitud para incluir 'Content-Type' y JSON
Voy a trabajar con goo.gl para acortar la URL. Necesito hacer la siguiente petición:
POST https://www.googleapis.com/urlshortener/v1/url
Content-Type: application/json
{"longUrl": "http://www.google.com/"}
mi html: -
<form method="post" action="https://www.googleapis.com/urlshortener/v1/">
<button type="submit"> submit </button>
</form>
¿Cómo agrego el 'tipo de contenido' y json aquí?