简体   繁体   English

如何使用 WireMock.NET 存根 gRPC 或 HTTP/2 请求?

[英]How can I stub a gRPC or HTTP/2 request using WireMock.NET?

I have a netcore web service that makes additional calls out to other webservices.我有一个 netcore web 服务,它可以额外调用其他 web 服务。 One of those other web services is gRPC-based.其他 web 服务之一是基于 gRPC 的。 I would like to write some tests at the protocol level by stubbing out the gRPC-based service with a simulated server.我想通过使用模拟服务器将基于 gRPC 的服务存根来在协议级别编写一些测试。

How can I stub a gRPC or HTTP/2 request using WireMock.NET?如何使用 WireMock.NET 存根 gRPC 或 HTTP/2 请求?

WireMock.NET does not currently support simulating HTTP/2 servers. WireMock.NET 目前不支持模拟 HTTP/2 服务器。 This would require a change to the library to allow configuring the Protocol on the WireMockServer and a change to the internal ResponseMessage to better support stream bodies and trailing headers.这将需要更改库以允许在 WireMockServer 上配置协议并更改内部 ResponseMessage 以更好地支持 stream 正文和尾随标头。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM