0

Где можно получить точный синтаксис HTTP запросов/ответов?

Например:

POST / HTTP/1.1

Может ли быть без пробелов?

POST/HTTP/1.1

и т.д

1 Answers1

5

Не может быть без пробелов.

Точный синтаксис можно получить из документа, описывающего стандарт HTTP 1.1: RFC 7230: Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing

Вот как описана строка Request line в секции 3.1.1:

A request-line begins with a method token, followed by a single space (SP), the request-target, another single space (SP), the protocol version, and ends with CRLF.

 request-line   = method SP request-target SP HTTP-version CRLF
Zergatul
  • 11,345