We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgraded from 1.2.14 to 1.4.9. Was setting the header in WithCallback. This was correctly coming through. Now no headers are returned.
Taking the example tests and adjusting it (removing .WithHeader(header, "Stef");), should return the header set within WithCallback:
public async Task Response_WithCallback_And_WithStatusCode_And_WithHeader() { // Assign var header = "X-UserId"; var requestMessage = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", "::1"); var responseBuilder = Response.Create() .WithCallback(request => new ResponseMessage { BodyData = new BodyData { DetectedBodyType = BodyType.String, BodyAsString = request.Path + "Bar" }, StatusCode = HttpStatusCode.Accepted, Headers = new Dictionary<string, WireMockList<string>> { { header, new WireMockList<string>("NA") } } }); // Act var response = await responseBuilder.ProvideResponseAsync(requestMessage, _settings); // Assert response.Message.BodyData.BodyAsString.Should().Be("/fooBar"); response.Message.StatusCode.Should().Be(HttpStatusCode.Accepted); response.Message.Headers[header].Should().ContainSingle("NA"); }
Headers are coming back empty.
response.Message.Headers.Count == 0 true
response.Message.Headers.Count == 0
The text was updated successfully, but these errors were encountered:
@GrantGHub Thanks for finding this.
Sorry, something went wrong.
#603
New version will be released shorty.
Thank you for such a fast turn around. I have retrieved the latest and confirm the issue has been resolved.
Thanks again for the responsiveness to this request. Appreciate it.
StefH
No branches or pull requests
Upgraded from 1.2.14 to 1.4.9. Was setting the header in WithCallback. This was correctly coming through. Now no headers are returned.
Taking the example tests and adjusting it (removing .WithHeader(header, "Stef");), should return the header set within WithCallback:
Headers are coming back empty.
response.Message.Headers.Count == 0
true
The text was updated successfully, but these errors were encountered: