mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-11-17 06:11:06 +01:00
Enrich generated code with status code (#927)
This commit is contained in:
1 parent
427715a38a
commit
1214ba5108
3 files changed
+8
No files matched your search
@@ -125,6 +125,11 @@ internal class MappingConverter
|
||||
// Response
|
||||
sb.AppendLine(" .RespondWith(Response.Create()");
|
||||
|
||||
if (response.ResponseMessage.StatusCode is { } statusCode)
|
||||
{
|
||||
sb.AppendLine($" .WithStatusCode({statusCode})");
|
||||
}
|
||||
|
||||
if (response.ResponseMessage.Headers is { })
|
||||
{
|
||||
foreach (var header in response.ResponseMessage.Headers)
|
||||
|
||||
Reference in new issue
Block a user