SHuoDo
SHuoDo

Reputation: 97

Do I have to encode http header into JSON?

I am designing a http server. I want to encode the body of http message into JSON. I know that a http message contains a header and a http body. I already encode everything into JSON format. How about the http header? Do I have to encode http header into JSON as well?

Upvotes: 2

Views: 253

Answers (1)

Matt Ball
Matt Ball

Reputation: 359786

Do I have to encode http header into JSON as well?

Absolutely not. Not only don't you have you, you must not. The headers describe the body, and must follow the standard for HTTP headers, which has nothing to do with JSON.

Upvotes: 2

Related Questions