I want to test the following method (generated by swagger) with fiddler:
[HttpPost]
[Route("/webservice/images")]
[SwaggerOperation("UploadImage")]
[SwaggerResponse(200, type: typeof(ResourceIdEntry))]
public virtual IActionResult UploadImage([FromForm] Stream image)
{
return new ObjectResult();
}
I configure Fiddler to send a POST to http://localhost:50352/webservice/images
with the Header
Content-Type: multipart/form-data; boundary=-------------------------acebdf13572468
User-Agent: Fiddler
Host: localhost:50352
Content-Length: 12931
and the body
---------------------------acebdf13572468
Content-Disposition: form-data; name="image"; filename="Test.tif"
Content-Type: image/tiff
<@INCLUDE *C:\...\Test.tif*@>
---------------------------acebdf13572468--
but UploadImage is not even called and I just get a 500 returned. If I remove the image parameter, the Method gets at least called. How do I have to configure fiddler so that the call is resolved correctly?