What is a request-response pair called? [duplicate

2019-03-10 13:05发布

问题:

This question already has an answer here:

  • Name for HTTP Request+Response 3 answers

For example in HTTP you send a request and receive a response; is there a noun that describes that request-response pair?

I'd thought of "dialog" or "conversation" however those imply multiple request-response pairs, whereas I'm looking for a word that indicates exactly one.

The reason for asking is that I need to name an object which encapsulates the details of both, and RequestResponse seems fairly lame.

回答1:

How about "exchange"?



回答2:

  • RFC2616 calls it an Exchange.
  • Wireshark and HTTPNetworkSniffer call it a Request/Response.
  • Fiddler calls it a Session.
  • Charles calls it a Sequence.
  • HTTP Scoop calls it a Conversation.
  • Other vocabulary includes: Message, Transaction, Communication.

I would go for Exchange or RequestResponse.

I also went to name it Operation in my code as I would queue Operations, flush Operations, pause or resume Operations.



回答3:

RequestResponsePair sounds like it does exactly what it says. And that's invaluable, I find.



回答4:

I'd use Message or Transaction



回答5:

Interaction



回答6:

Transceival or ServiceCall might work.



回答7:

HttpRoundTrip - inspired by Jeff Atwood in this blog post



回答8:

Fiddler calls it a Session.



回答9:

OpenRasta used "communication" for the request/response couple.



回答10:

In my particular case I consider calling it a Connection. When you send a HTTP request, you're basically establishing a connection with some endpoint.

At least one reason why I dislike it is that similar to Session, one can assume there is some activity at the moment happening, which may or may not be true.

Background: I need to log all interactions with third-party service.

P.S. IMHO, Exchange is the best among others. It sounds more abstract.



回答11:

what about RequestResponseContext?



回答12:

What about ServiceConversation



标签: http naming