West Wind Internet and Client Tools
HttpGet url string length limitation
Gravatar is a globally recognized avatar based on your email address. HttpGet url string length limitation
  mwong
  All
  Mar 27, 2018 @ 12:06pm

Hi,

Is there a way to get HttpGet to accept a url longer than 255 characters? I am currently able to send a url that is 240 characters long but once I exceed 255 it gives an error.

Thanks, Mike

Gravatar is a globally recognized avatar based on your email address. re: HttpGet url string length limitation
  Rick Strahl
  mwong
  Mar 27, 2018 @ 01:22pm

The limit most likely comes from the receiving Web server not from the client.

I just tried this:

lcsend = UrlEncode(REPLICATE("Wind makes the world go around",15))
? LEN(lcSEND) && 600

loHttp = CREATEOBJECT("wwHttp")
? loHttp.HttpGet("https://localhost/wconnect/TestPage.wwd?Name=Rick&Company=" + lcSend)

and that works just fine. So it's the server that's rejecting the long query string.

If you are sending data you should really be using POST to send the data, not cram it into a URL. Query string values are meant for identifying requests - IDs basically - not to send extensive data.

+++ Rick ---

© 1996-2024