-7

I have a URL with a 27 kB JSON parameter.

http://192.168.0.174:80/Service1.svc/CargarClientes?json=VERY_LONG_JSON_PARAMETER

But when I execute the statement it indicates the following error:

Request URL Too Long HTTP Error 414. The request URL is too long.

How can I solve this situation, since I must send the data in that way?

elixenide
  • 44,308
  • 16
  • 74
  • 100
  • 6
    Use HTTP POST instead. And if that's not available, then you simply can't do it. – Dan Wilson Nov 30 '16 at 16:09
  • 3
    get requests cannot be this long. Posts yes, gets no – Kritner Nov 30 '16 at 16:09
  • 2
    You're going to have to break up the request into pieces or submit it in a different way (POST, instead of GET). There's no way to use a 27 kB URL (at least not reliably), and the server you're hitting won't take it, which is why you're getting that error. – elixenide Nov 30 '16 at 16:35
  • Thanks Ed Cottrell, How can I send it in pieces? – Arnold Ulate Segura Nov 30 '16 at 22:58
  • Can you please provide further details on why you are required to send such a massive amount of information in the URL rather than simply doing a POST? – s3raph86 Dec 01 '16 at 10:57
  • I need to upload data from a mobile to a server, I do not do it by POST because I need to get the new data consecutively. – Arnold Ulate Segura Dec 01 '16 at 16:30

1 Answers1

1

In theory it should be possible to use any length url, but in reality this not like that.

If you keep URLs under 2000 characters, they'll work in virtually any combination of client and server software.

See this answer for details:

Community
  • 1
  • 1
a-man
  • 657
  • 1
  • 6
  • 16