Stellen Sie eine Anfrage, um 'Content-Type' und JSON aufzunehmen

Ich soll mit goo.gl für die URL-Verkürzung arbeiten. Ich muss folgende Anfrage stellen:

POST https://www.googleapis.com/urlshortener/v1/url
Content-Type: application/json
{"longUrl": "http://www.google.com/"}

mein html: -

<form method="post" action="https://www.googleapis.com/urlshortener/v1/">
    <button type="submit"> submit </button>
</form>

Wie füge ich den 'content-type' und json hier hinzu?

Antworten auf die Frage(3)

Ihre Antwort auf die Frage