77

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.

Greg Beech
  • 133,383
  • 43
  • 204
  • 250

12 Answers12

54
  • 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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • 1
    Really, a good choice, although RFC2616 refers to the word *exchange* merely twice. – Jimm Chen Feb 08 '15 at 13:08
  • Any chance you might copy/paste this answer? The duplicate question has an accepted answer that is in my opinion significantly less thorough. https://stackoverflow.com/questions/325346/name-for-http-requestresponse – Jonathan Sep 21 '19 at 04:53
  • 1
    @Jonathan done. Note that all this content being CC-By-SA, you could have copied it with attribution. :) – Cœur Sep 22 '19 at 00:59
41

How about "exchange"?

David M
  • 71,481
  • 13
  • 158
  • 186
  • 1
    According to this previous question (http://stackoverflow.com/questions/325346/name-for-http-requestresponse), that's what the spec uses. – bbrown Jun 24 '09 at 16:54
17

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

Brian Agnew
  • 268,207
  • 37
  • 334
  • 440
9

Interaction

natas
  • 183
  • 9
8

I'd use Message or Transaction

Kai
  • 9,444
  • 6
  • 46
  • 61
  • 1
    [TsSkTo](http://stackoverflow.com/users/2660924/tsskto) [points out](http://english.stackexchange.com/a/125302/23199) that this can get confusing when you are working with but not currently talking about databases. [EricLaw](http://stackoverflow.com/questions/1039513/what-is-a-request-response-pair-called#comment850282_1039589) points out that http traffic is not transactional. Regarding message, I think it's too loose concerning the count and direction of messages (it may consist of a pair but also can be just a single message). – n611x007 Sep 04 '13 at 17:34
4

Transceival or ServiceCall might work.

An̲̳̳drew
  • 13,375
  • 13
  • 47
  • 46
4

HttpRoundTrip - inspired by Jeff Atwood in this blog post

John Rasch
  • 62,489
  • 19
  • 106
  • 139
2

Fiddler calls it a Session.

Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
  • 3
    Session works pretty well, but it has the minor downside that some may assume that it has something to do with "session cookies" or related technologies. Transaction seems like a fine name, except that Transaction implies that HTTP traffic is somehow transactional (with rollback, etc) which it's not. – EricLaw Jun 24 '09 at 17:01
  • i do't know what the OP's usage will be. But i use Fiddler quite a bit, and i've never had any problem with the term "session". In fact, it was so transparent (since it's just a term for that request-response pair) that had to load Fiddler to see what they called it, if anything. – Ian Boyd Jun 24 '09 at 22:43
  • 1
    Hey, wait a minute....Eric Lawrence...Fiddler – Ian Boyd Jun 24 '09 at 22:46
  • 1
    With the benefit of hindsight, I'd use `Exchange` if I were building Fiddler again. – EricLaw Mar 31 '16 at 14:57
1

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

SerialSeb
  • 6,701
  • 24
  • 28
1

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.

Artur INTECH
  • 6,024
  • 2
  • 37
  • 34
0

What about ServiceConversation

Mariusz Jamro
  • 30,615
  • 24
  • 120
  • 162
-1

what about RequestResponseContext?

dfa
  • 114,442
  • 31
  • 189
  • 228