microsoft / vss-web-extension-sdk

Visual Studio Teams Service Web Extension SDK
https://www.visualstudio.com/docs/integrate/extensions/overview
MIT License
133 stars 92 forks source link

executeServiceEndpointRequest TFS.WebApi.Exception: Size of the POST body exceeds the size limit of 2048 bytes. #127

Open rorezende opened 5 years ago

rorezende commented 5 years ago

The API executeServiceEndpointRequest (ServiceEndpointHttpClient) currently supports around 4K query string for requestVerb=GET but it supports only a 2K body for POST requests.

Got the following exception type: TFS.WebApi.Exception and message "Size of the POST body exceeds the size limit of 2048 bytes."

Repro: have a "ms.vss-endpoint.endpoint-types" such that the dataSource requestVerb is POST and the body > 2048.

Scenario: Currently consuming a service using GET requests, which recently learned it limits query strings to 4K (Azure Functions) Now, to handle such limitation, I'm switching from GET to POST since AF supports much larger bodies.

Surprisingly, VSTS Api restricts more POST than GET, at least when using the endpoint proxy.

My request is to increase the limit for the body size. I believe Azure Functions supports a request length of 100K.

omeshp commented 5 years ago

We have increased the limit to 100k and this fix should be deployed in a week.