Http you need to "love"

The purpose is to further the understanding of the vernacular http, people facing the industry, there are some Chigua ...

Story background Description:
male pig to his female vote sent a Valentine's Day message, "I love U", the actress received a very happy, also replied to a message, "me too".
The story is very simple, just sauce. Now with this simple story and http protocol communication match.

Male host ( client ) micro letter ( GET request ) to the female vote ( URI of the ) told her it was the anniversary special edition ( Http / 1.1 information), and said female votes "I love U" ( request body ).

Female host ( server ) very happy, she knew this was the anniversary special edition ( Http / 1.1 information), she received ( 200 the OK ), and replied "Me TOO" (response body ).

Here the exchange of information once the male and female ends. The above story is not related to the request headers and response headers, since these are optional communication parameters, if these optional parameters are also added love story, I was so crap.

Request header fields:

  • content-length: 8, represented here "I love U" of the contents of the character length is 8
  • User-Agent: Mozilla / 5.0 (Win ..., micro-channel can be expressed settings, send a special field when there are interface-related expressions pop (kiss, hug, flower, etc.)
  • ...
    response header fields:
  • Date: Wed, 12 Jun 2019 13:13:14 GMT, female controls a timing where transmission information is 13:14
  • Server: nginx, here is her micro-channel client
  • Content-Length: 6 ,这里也可以表示她回复"me too" 信息字符串长度。
  • ...

但是,这样一个节日互表心意的信息,有问题:

  1. 真的可以如期如愿传递到对方的手里吗?
  2. 女主接受的信息确定是他男票发来的,而不是第三者发来的骚扰信息?
  3. 他男票发送的信息,确定是“表白”而不是“分手”?

下篇,谁为你的“http爱情” 保驾护航。

Guess you like

Origin www.cnblogs.com/adouwt/p/11119862.html