Agentic Research

HTTP

Also: 超文本傳輸協定 · HTTP 協定 · HTTPS · http 是什麼

The request/response language between clients and servers — and the transport every model API uses.

When you will meet it

The first time you call an AI API you are sending an HTTP request. Without this you cannot tell whether a failure lives in the URL, the headers or the body.

An analogy

Like postal mail: you write an address, subject and body (the request) and post it; the other side replies (the response). HTTP is the agreed format of envelope and letter; HTTPS slips it into a tamper-proof envelope only the recipient can open.

Minimal example

# 印出一個完整的 HTTP 回應:狀態行 + 標頭 + 內文
curl -i https://example.com

The first line HTTP/1.1 200 OK is the status line, the next lines are headers from the server, and after a blank line comes the body. Every API call, unwrapped, has this shape.

What people get wrong

  • Thinking HTTP and HTTPS are different protocols. HTTPS is HTTP inside an encrypted TLS tunnel — identical structure, just unreadable to anyone in the middle. Model APIs are always called over HTTPS.
  • Blaming the key for a typo in the URL. 404 (not found) usually means a wrong path; 401 (unauthorised) means a bad key — but both are HTTP telling you which part broke.

Related terms

Next