SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard
    Join Date
    Jan 2005
    Location
    blahblahblah
    Posts
    1,447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is the limit to the data you can pass through a GET request the same as the query?

    Hello,

    I'd like to send some large data through a GET request. I must do this upon accessing a page. So it's a GET, not a POST. I thought about using a querystring, but what I have to pass may in some cases excess the size limit of a querystring.

    I was wondering if, using Curl, I could issue a GET request and send that data, or if the size limit would be the same as for a querystring anyway.

    Regards,

    -jj.

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,496
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    As far as I know it's the same.
    But why do you need to use the query string? Is the receiving page expecting the data in the query string?

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2011
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This usually depends on your web server. Apache server has a limit of query string. It can be adjusted if necessary

  4. #4
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,026
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)
    GET is for reads, POST is for writes. If you're CURL'ing to another service you need to use the method their API tells you to - if they wrote it correctly choosing your own method won't work. Also, GET is limited to around 32K on most server setups, while POST can get way up there. Even on servers where that is changed, GET is rarely upped to the point of POST.

    Also bear in mind that proxy servers may, at their discretion, cache GET requests. That could be troublesome.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •