I have this method in WebApi
[IHttpActionResult]
[Get]
public void GetSome(P1, P2 ....... Pn)
{
...///
}
Just curious:
Any ideas, what is the maximum number of parameters allowed by WebApi for this method ?
You mean technically or practically? :p
The C# method parameter limit is 65,535. Most browsers only support an URL of 2000 to 4000 characters. Depending on the consumer of your API, there might be some restrictions there as well.
But most importantly: what are you trying to do? Seriously?
You're creating an API, simple methods that are easy to understand should be your main goal. I'm not sure a method with 65000 parameters would be anywhere near simple.
To me this sounds like step 1 of a walk down "OMG kill this code" lane :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With