I've been working on this issue for a day or two.. I am new to .asp Web API.
What is the proper way of uploading/sending a class from my C# .net 4.0 application to Web API controller, The C# application is on computer A, the WebAPI is on computer B.
Till now I Used HttpRequestMessage and StringContent as content and sending using HttpClient class. I have successfully .Put the class as json, but now the class has got a bit bigger, and i need to compress and send it.
What i thought i need to do is take the class, json it, zip it, and send as zipped byte[].
Is this the correct approach ?
I have posted some question and was trying to find good guides - did not succeed.
This is link to previous post:
C# .net 4.0 Upload a file to .asp Web API
Maybe my approach is wrong ?
public void MyMethod([FromBody] MyClass inputClass)
– Nilesh<httpRuntime maxRequestLength="Put the max size here lik 1000000" />
– Nilesh