I wrote my first POST API recently. It does something like this
http://localhost:3000/api/v1/company_donations.xml?token=SOMEVALUE&xmlobject=SOMEVALUE
Now that xmlobject will have a XML string passed to it which contains all the objects required to create the POST. A simplified version of the XML looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<company_donation_request>
<order>
<id>39405</id>
</order>
<donation> <amount>23.30</amount> </donation>
<donation> <amount>40.40</amount> </donation>
...
</company_donation_request>
Question:
I read that URL length is max 2048 chars. I fear that the xmlobject string length could overshoot that length. What can I do so that the 2048 char limit does not apply to my POST data?
the url length affects only to GET parameters, not to POST, this is because the data is transferred in the headers and not in the URL.
The POST data is limited by browser or server, but if your data is big you should use the