How can I override urlfetch _MAX_URL_LENGTH?

28 views
Skip to first unread message

pdknsk

unread,
Aug 5, 2011, 8:54:24 AM8/5/11
to Google App Engine
I've got a REST request which exceeds 2048 characters. The server can
handle it no problem, but urlfetch cannot! Is there a way to override
it? Thanks! Why did Google set a limit, I'm wondering.

http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/api/urlfetch_stub.py

Tim Hoffman

unread,
Aug 5, 2011, 9:25:46 AM8/5/11
to google-a...@googlegroups.com
I doubt it.

The underlying service will no doubt truncate it.

I am amazed it needs a URL that long.  

T

pdknsk

unread,
Aug 5, 2011, 11:41:48 AM8/5/11
to Google App Engine
I'll have to switch to SOAP then :(

Tim Hoffman

unread,
Aug 5, 2011, 8:41:05 PM8/5/11
to google-a...@googlegroups.com
I would seem to me that a REST service that requires >2048 chars in the URL is probably poorly written.

T

Brandon Wirtz

unread,
Aug 5, 2011, 8:43:25 PM8/5/11
to google-a...@googlegroups.com
Try using post instead of get. Sometimes API's support this and don't say
so.

http://code.google.com/p/googleappengine/source/browse/trunk/python/google/a
ppengine/api/urlfetch_stub.py

--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengi...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.


Tim Hoffman

unread,
Aug 5, 2011, 9:28:37 PM8/5/11
to google-a...@googlegroups.com
Thanks Brandon, worth mentioning.

You know I thought of saying that heaps of times, but assumed that was obvious ;-)

A GET only rest api wouldn't be very well designed 

T

pdknsk

unread,
Aug 6, 2011, 10:35:17 AM8/6/11
to Google App Engine
It's not documented, but it works! :)
Reply all
Reply to author
Forward
0 new messages