Question

I have been struggling with this for few days now, (new to fiddler)

My Url looks like this:

mywebservice/miclaim/casedetail/GetCaseDetail/638110079?apikey=MiClaimUK&token=ZD31MsFiLrFA2hCZShBJ7i4iinqeRxfYNrIsDHWriQM=

Now this is a multipart/form-data content type, and i tried a few things to submit my form data like this: (I have no problem submitting file though.. its just the form data along with file!)

adding the values after the token stuff in the query

LossItemId=1&Description=d&ClaimedAmount=1234.5&WherePurchased=reading&BasisOfValuation=basis&Status=sta

or just adding them on the request header but nothing seems to work, I still don't get my form data values in the controller...

I think it must be fairly obvious and usual thing in fiddler to do, but why am in having so much trouble? What am I missing?

Note: I can test my app by a test client using html form ..enctype="multipart/form-data" method="POST"> and it works... but not in Fiddler??

Était-ce utile?

La solution

Had to revisit this problem in my project in the context of some other issue..and finally got it working this time around (for those who might come across a similar issue):

---------------------------acebdf13572468
Content-Disposition: form-data; name="ToDo"
Content-Type: application/json

{"ToDoId":32,"InstructionId":6300460,"Description":"Description","Comment":"Comment","DueDatetime":"2014-02-28T16:44:52.8140079Z","SubmittedDatetime":"2014-02-28T16:44:52.8140079Z","StatusCode":10,"Media":[{"MediaId":0,"MediaDescription":"abc","CreatedDate":"2014-02-28T16:44:52.815008Z","MediaType":"Doc","UrlPath":null},{"MediaId":0,"MediaDescription":"foo","CreatedDate":"2014-02-28T16:44:52.815008Z","MediaType":"Image","UrlPath":null}]}  
---------------------------acebdf13572468
Content-Disposition: form-data; name="fieldNameHere"; filename="abc.txt"
Content-Type: text/plain

<@INCLUDE *C:\uploads\abc.txt*@>
---------------------------acebdf13572468
Content-Disposition: form-data; name="fieldNameHere"; filename="Foo.txt"
Content-Type: text/plain

<@INCLUDE *C:\uploads\Foo.txt*@>
---------------------------acebdf13572468--
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top