3 ms·
It was clj-oauth and clj-apache-http. I've been working on building a generalized DSL for http-requests (based on a site structure description generate the req
by anonjon 17y ago
It was clj-oauth and clj-apache-http.
I've been working on building a generalized DSL for http-requests (based on a site structure description generate the request-functions).
I figured it would be interesting to test it with twitter's oauth. It works quite well for http-get requests, didn't work very well for post requests (ex. status updates). Squinted at it, macro-expanded a few times and fixed a bug... now it seems to be generating the right code. Still not working
So I went back to the base case (libraries without my DSL over-top, direct from tutorial), posts still didn't work.
Anyway, the interesting thing is that posts will work for very short strings, or strings that are very repetitive (a string full of s's 'ssssssssssssssssssssss...' would post, as would 'wtf' and 'ww'; 'well this is a nice message', would not...).
Much hacking and fussing and resetting of keys later, it was 4am and I had to get up and work in a few hours (did I mention I was doing this for fun? sigh).
So I'm starting to think that something may have changed in twitter's oauth spec between when I downloaded the libraries and when I got back to using them (it was a few months). Other than that, I suppose my next step would be to look at some other implementations and figure out if there is a bug in the what I am using.
I guess my point is, even easy things aren't easy.