mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Proxy Missing header Content-Type - tried with Recording #209
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gregoks on GitHub (Aug 29, 2019).
Originally assigned to: @StefH on GitHub.
Hi,
I'm having an issue when using proxy, the content-type header disappears.
Though I saw that this issue was resolved - (https://github.com/WireMock-Net/WireMock.Net/issues/210)
But it still doesnt work for me.
I'm trying to send a request with "Content-Type" header with the following value:
application/soap+xml;charset=UTF-8;action="http://myCompany.Customer.Contract/ICustomerService/GetSomeConfiguration"with a proxy and I dont see the header in the proxy url. I have tried to use the proxy with record settings like you suggested in the original bug:
but where do I see the recorded mappings?
From your code I dont understand how you use the ProxyAndRecordSettings in proxy because this method only uses the url part of the settings and not the recording options? ('Response' class):
Can you please advise on:
Thanks!
Greg
@StefH commented on GitHub (Aug 29, 2019):
See the example project
WireMock.Net.Console.NETCoreApp2, with maping:When posting a message like this:

You see that all headers are correctly sent and returned by by postman echo service.
@gregoks commented on GitHub (Aug 30, 2019):
Hi @StefH,
Ive made similar test to what you showed me and it looks like the "action" part of the Content-Type header isnt being sent, so the test that I've made is:
@StefH commented on GitHub (Aug 30, 2019):
I see. This is a bug. I'll check the code.
@StefH commented on GitHub (Aug 30, 2019):
You can try version WireMock.Net.1.0.30-ci-11848 from MyGet
@gregoks commented on GitHub (Aug 31, 2019):
Thanks for the quick fix as usual!
Ill give it a go and let you know :)
@StefH commented on GitHub (Aug 31, 2019):
I think it works as expected:

@gregoks commented on GitHub (Aug 31, 2019):
yep just tested it. thanks a lot!
@StefH commented on GitHub (Sep 1, 2019):
New NuGet is uploaded