Questions tagged [drakma]

Drakma is a fully-featured web client (implemented in Common Lisp) that knows how to handle HTTP/1.1 chunking, persistent connections, re-usable sockets, SSL, continuable uploads, file uploads, cookies, and other things.

Drakma is a fully-featured web client (implemented in Common Lisp) that knows how to handle HTTP/1.1 chunking, persistent connections, re-usable sockets, SSL, continuable uploads, file uploads, cookies, and other things.

See http://weitz.de/drakma/

15 questions
6
votes
2 answers

URL-decode a string in Common Lisp

I have a string that contains an escaped URL: http%3A%2F%2Fexample.com%3Ffoo%3Dbar+baz I'm trying to decode it to the following: http://example.com?foo=bar+baz However, I can't find any suitable function exported by Drakma. I can encode like…
Duncan Bayne
  • 3,870
  • 4
  • 39
  • 64
5
votes
1 answer

CL+SSL SSL Error: Unsafe legacy renegotiation disabled. How to bypass or resolve?

I'm trying to hit an https endpoint to pull back some data using common-lisp(sbcl). For a while this worked without issue. Then one day I started receiving the following error SSL error queue: error:0A000152:SSL routines::unsafe legacy renegotiation…
jfaulks
  • 67
  • 1
  • 1
  • 6
4
votes
1 answer

Error Using Drakma for the Bing Search API Common Lisp

I am building a program that uses Bing's search API and common lisp with the Drakma library to display some results but for some reason have an error when sending a longer length query It doesn't display any of the results at all. It works for…
phlie
  • 1,335
  • 3
  • 10
  • 19
4
votes
1 answer

Unpredictable behaviour with drakma-async and cl-async

I'm trying to use drakma-async in my small project. But I just can't understand what's happening. (I use emacs + slime + ccl). I need to get data with http(s) and parse it in a callback. I assume I can get wrong data that cannot be parsed, so I want…
JustAnotherCurious
  • 2,208
  • 15
  • 32
4
votes
2 answers

How to enable drakma to handle non-latin-1 characters in URL

I encountered an error caused by non-Latin-1 characters used in a given url using sbcl e.g.: (drakma:http-request "http://www.youtube.com/„weird-url") debugger invoked on a FLEXI-STREAMS:EXTERNAL-FORMAT-ENCODING-ERROR in thread #
Sim
  • 4,199
  • 4
  • 39
  • 77
4
votes
1 answer

POST JSON data using drakma:http-request

I am trying to POST some JSON data to a web service using drakma. (ql:quickload :st-json) (ql:quickload :cl-json) (ql:quickload :drakma) (defvar *rc* (merge-pathnames (user-homedir-pathname) ".apirc")) (defvar *user* …
piokuc
  • 25,594
  • 11
  • 72
  • 102
4
votes
1 answer

PURI:URI how to get the actual string represented

Drakma returns an PURI:URI object as a fourth return value. But I want to extract the actual string and not mess around with the object. What is the name of the accessor as puri:uri-string which accesses directly the corresponding slot is not public…
Sim
  • 4,199
  • 4
  • 39
  • 77
3
votes
1 answer

Drakma and Dexador both fails at USocket call while requesting localhost only, requesting the internet works fine

There is an unexplained behavior for me for the moment, appreciate any clues. Background I have a locally running instance of wordpress via PHP built-in development webserver php -S localhost:8000 -t /doc/root/wordpress. The site works, I can fetch…
hsrv
  • 1,372
  • 10
  • 22
3
votes
1 answer

How to call a web service with XSD using Common Lisp?

I've searched all over for an example of using a Common Lisp library (like Drakma) to call a RESTful web service, but all I've found are specific API calls to third party services. The Drakma site doesn't indicate how a schema would be used with an…
2
votes
0 answers

how to implement timeout with fragmented output for drakma

Drakma does not currently support timeouts for SBCL but I need a timeout which returns the content transported up to the point in time the timeout occurred. This is my current working attempt, but is probably a rather good fit for thedailywtf…
Sim
  • 4,199
  • 4
  • 39
  • 77
1
vote
2 answers

drakma: How to pass JIRA API token for requests?

When I do the following, passing my JIRA API token ... curl --verbose --request GET \ --url 'https://myJira.atlassian.net/....' \ --user 'my_email@domain.com:my_jira_api_token' ... ... the operation succeeds and I see one of the headers…
user3735178
  • 129
  • 10
1
vote
1 answer

Signing Requests & Timestamps

Amazon has a handy-dandy tool for testing requests and confirming that you are signing requests correctly they call a 'scratchpad'. You hand it an unsigned request, put in your authentication information, hit submit, and it spits out a signed…
clintm
  • 1,259
  • 10
  • 23
0
votes
1 answer

Get HTTP headers as alist

I want to get the redirect url of a HTTP-request using drakma. If I pass in "http://lisp.org/", I want "http://lisp.org/index.html" back. Looking at the docs, it looks like I want the headers as an alist and drakma:http-request should give me an…
deadghost
  • 5,017
  • 3
  • 34
  • 46
0
votes
0 answers

drakma:http-request crashes during https request while using burp as a proxy

I want to study some outgoing traffic of drakma by using the burp-suites as a automatic proxy. But when making https request drakma signals (more precisely cl+ssl drakma uses) crashes: (drakma:http-request "https://www.stackoverflow.com" …
Sim
  • 4,199
  • 4
  • 39
  • 77
-1
votes
1 answer

Open SSL Error in common lisp using the drakma library when accessing secure sites

I have the package drakma installed from quicklisp Saying I am missing Unable to load any of the alternatives: ("libcrypto.so.1.1" "libcrypto.so.1.0.0" "libcrypto.so") [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR] when trying to access non…