1

I am using .net core 5 and I am using Refit third-party library to implement HTTP client with an API. I am facing an issue now when I pass very long string in http get query, i am getting Bad Request because of Refit cause API exception. My question is that is there anyway to add configuration to RefitClient which will resolve the issue.

1 Answers1

1

First of all, we need to understand why this exception occurs.

Refit third-party libraries should also follow RFC rules. So the only way is to use Post request. There will be no configuration to allow very long strings for http requests.

Related Post:

What is the maximum possible length of a query string?

Jason Pan
  • 15,263
  • 1
  • 14
  • 29