1

I have a .NET Core API that I try to access with a HttpClient, the problem is that I try to pass a long list of parameters (400 identifiers by example).

Then I got a message from the server : 414 request-uri too long

Of course, it make sense, this URI is really long.

I need to fix the .NET Core server, but how ? Maybe the client too, lets see !

But how can I fix this (I need a GET, the response will be very long too).

Do you have any idea ?

Thx

ClubberLang
  • 1,624
  • 3
  • 21
  • 45

1 Answers1

3

The term you need to search for is maxUrlLength.

See this as a possible answer -> ASP.Net Core maxUrlLength

The answer is really server-specific, IIS, Kestrel, etc.. you also gotta factor that browsers also have limits.

Your best bet is to switch to a POST.

Paul Lorica
  • 703
  • 4
  • 6