danielcrenna/hammock — Issue #48: Issue with large URL-encoded parameters
Author: stoiveyp
Created: 2011-10-26 07:43:05+00:00
State: open

I realise this is an edge case in regard to the API I'm attempting to access, but I'm currently writing a Tumblr API using Hammock - really easy to put together, almost 100% feature complete....except their implementation of photo upload.

The API requires photos to be URL-encoded binary data instead of multi-part form requests (I know...believe me I have raised this!). The problem is that when I use AddParameter and append the photo, the hammock request goes through Uri.EscapeDataString and hits the built-in uri length check, forcing all my requests to throw a "Uri is too long" exception.

I've tried chunking the string but it never quite works and the process always breaks inside OAuthTools.UrlEncodeRelaxed.

This is the last call I need to implement before I can release my WP7 app and it's driving me mad - if anyone has any suggestions to an alternative method or library I can use, as my home-grown ones don't appear to be helping the situation.

I have also raised a request for multi-part forms to be accepted with Tumblr, as the old Tumblr API used to use them and Hammock worked like a dream!