请求-响应对叫什么?

发布于 2024-07-26 04:16:54 字数 181 浏览 5 评论 0原文

例如,在 HTTP 中,您发送请求并接收响应; 是否有一个名词来描述该请求-响应对?

我想到了“对话”或“对话”,但它们意味着多个请求-响应对,而我正在寻找一个恰好指示一个的单词。

询问的原因是我需要命名一个封装两者细节的对象,而 RequestResponse 似乎相当蹩脚。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(12

递刀给你 2024-08-02 04:16:55

ServiceConversation 怎么样?

What about ServiceConversation

长发绾君心 2024-08-02 04:16:55

RequestResponseContext 怎么样?

what about RequestResponseContext?

素食主义者 2024-08-02 04:16:54
  • RFC2616 将其称为“交换”。
  • Wireshark 和 HTTPNetworkSniffer 将其称为请求/响应。
  • Fiddler 将其称为会话
  • Charles 将其称为序列
  • HTTP Scoop 将其称为“对话”。
  • 其他词汇包括:消息事务通信

我会选择 ExchangeRequestResponse

我还在代码中将其命名为 Operation,因为我会对操作进行排队、刷新操作、暂停或恢复操作。

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

稳稳的幸福 2024-08-02 04:16:54

说好的“交换”呢?

How about "exchange"?

埋葬我深情 2024-08-02 04:16:54

RequestResponsePair 听起来就像它所说的那样。 我发现这是无价的。

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

[旋木] 2024-08-02 04:16:54

相互作用

Interaction

梦里人 2024-08-02 04:16:54

我会使用消息或交易

I'd use Message or Transaction

迷雾森÷林ヴ 2024-08-02 04:16:54

Transceival 或 ServiceCall 可能有效。

Transceival or ServiceCall might work.

挽清梦 2024-08-02 04:16:54

HttpRoundTrip - 灵感来自 Jeff Atwood 的 这篇博文

HttpRoundTrip - inspired by Jeff Atwood in this blog post

瀟灑尐姊 2024-08-02 04:16:54

Fiddler 将其称为会话

Fiddler calls it a Session.

落墨 2024-08-02 04:16:54

OpenRasta 使用“通信”来表示请求/响应对。

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

独享拥抱 2024-08-02 04:16:54

在我的特定情况下,我考虑将其称为连接。 当您发送 HTTP 请求时,您基本上是在与某个端点建立连接。

我不喜欢它的至少一个原因是,与 Session 类似,人们可以假设当前正在发生一些活动,这可能是真的,也可能不是。

背景:我需要记录与第三方服务的所有交互。

PS 恕我直言,Exchange 是其中最好的。 听起来比较抽象。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文