Wyślij prośbę o wpisanie „Content-Type” i JSON
Mam pracować z goo.gl w celu skrócenia adresu URL. Muszę złożyć następującą prośbę:
POST https://www.googleapis.com/urlshortener/v1/url
Content-Type: application/json
{"longUrl": "http://www.google.com/"}
mój html: -
<form method="post" action="https://www.googleapis.com/urlshortener/v1/">
<button type="submit"> submit </button>
</form>
Jak dodać tutaj „typ zawartości” i jsona?