lamchakchan / RestAssured.Net

A simple testing suite for REST based interfaces
Apache License 2.0
117 stars 49 forks source link

.Body() only serialises to json objects and doesn't support other types such as binary files #52

Open Ewan88 opened 3 years ago

Ewan88 commented 3 years ago

I require the ability to submit binary files as part of a request body for testing.

I can't use .File() because this converts the request to a multipart/form - which my server does not expect.

The current implementation of Body() in RA/src/SetupContext.cs line 159 uses JsonConvert.Deserialize() but I need a way to prevent it from converting everything to json and use the correct serializer for whatever I pass in.

@DayneD89 - I know you're working on this at the moment, could you possibly look into this?

Thanks.