orthecreedence/drakma-async

EXTERNAL_FORMAT parameter would be helpful for http-request

FrankRuben opened this issue · 2 comments

Hello Orthecreedence,
first of all thanks a lot for your CL libraries - seriously cool stuff, very impressive.

Might be a miss-understanding on my side, but you're passing a hard-coded :external-format :latin-1 when calling http-stream in http-request. Given that http-request already has a gozillion keyword arguments, one more wouldn't hurt and it could happen quite easy that latin-1 is not sufficient.

Would be nice if you could check.

Regards, Frank

Btw.: greetings to Christina ;)

Hey, thanks for the kind words =]. This looks like more of a bug than anything else. It should have been using the external-format-in value that was already being passed in (defaults to *drakma-default-external-format* which is :latin1). I like to keep argument-parity with the default drakma lib, which future proofs drakma-async. In this case it's easy because there was already a parameter for what you wanted to do. I just hadn't wired it up correctly.

So if you do a git pull, from now on you should be able to specify your output format by doing:

(drakma-async:http-request "http://my-url.com/resource" :external-format-in :utf8)

Let me know this gives you any issues!

Also, Christina says congratulations for finding her secret message.

Hi Andrew,
thanks for the quick fix and the friendly answer!
Not sure whether I can test quickly - I had no actual test case to find
that, but just saw it by screening through the sources and Easter vacation
is over and I'm back to my boring enterprise job with fun time for hacking
being very limited again...
Anyway - there will be another weekend ;)
Thanks again and best regards, Frank

On Mon, Apr 21, 2014 at 7:54 AM, andrew lyon notifications@github.comwrote:

Closed #16 #16.


Reply to this email directly or view it on GitHubhttps://github.com//issues/16
.