mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Using request multipart in response template #526
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 @rmeshksar on GitHub (Jul 17, 2023).
Originally assigned to: @StefH on GitHub.
Hi,
The content-type of the request is
multipart/form-data; boundary=4f5cb47fa8f04c7f91424474f070f497+1110027
Each section of multipart is an XML like this:
In the response template I would like to use XPath to get some information of specific section.
Is it possible?
@StefH commented on GitHub (Jul 19, 2023):
Currently there is no special logic to parse a multipart and extract the parts. I'll need to think on this how to could be added and how this could be used.
@StefH commented on GitHub (Jul 25, 2023):
@rmeshksar
I'm building support for multipart request matching using MimeKitLite, and I think I can also use this in the templating...
@StefH commented on GitHub (Jul 28, 2023):
@rmeshksar
You can use preview version
1.5.32-ci-17678where you can accessrequest.BodyAsMimeMessagewhich is a MimeMessage from MimeKitLite.https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions
@StefH commented on GitHub (Jul 31, 2023):
@rmeshksar
Did you have time to test this preview version?
@StefH commented on GitHub (Aug 3, 2023):
@rmeshksar
Did you have time to test this preview version?
It would really help if you can try this version before I merge to this main and create a new official version.
@StefH commented on GitHub (Aug 3, 2023):
https://github.com/WireMock-Net/WireMock.Net/pull/981
@eetawil commented on GitHub (Feb 13, 2024):
Hi @StefH, would this PR solve my problem here: https://stackoverflow.com/questions/77989392/wiremock-net-c-how-to-get-a-pdf-from-a-request-body-form-data
Also is part of the latest nuget package 1.5.47?