Re: extract headers from response record

2023-08-09 Thread wolf
On 2023-08-09 10:18:05 -0400, Mortimer Cladwell wrote: > Hi, > I am running a local fake Urbit zod on port 8080. I want to submit an > http-request and obtain an urbauth id cookie. I run the following method: > > (use-modules (web client)(web response) (srfi srfi-9)(oop goops) (ice-9 > receive) (i

Re: extract headers from response record

2023-08-09 Thread wolf
On 2023-08-09 10:18:05 -0400, Mortimer Cladwell wrote: > Hi, > I am running a local fake Urbit zod on port 8080. I want to submit an > http-request and obtain an urbauth id cookie. I run the following method: > > (use-modules (web client)(web response) (srfi srfi-9)(oop goops) (ice-9 > receive) (i

re: extract headers from response record

2023-08-09 Thread Mortimer Cladwell
a couple more: (pretty-print (record? a)) ==> #t (pretty-print (record-predicate a)) ==> not-a-record-type #< version: (1 . 1) code: 204 reason-phrase: "ok" headers: ((date . #) (connection close) (server . "urbit/vere-2.11") (set-cookie . "urbauth-~zod=0vao7n2.lcut2.mu17h.9dgil.2o48i; Path=/;

extract headers from response record

2023-08-09 Thread Mortimer Cladwell
Hi, I am running a local fake Urbit zod on port 8080. I want to submit an http-request and obtain an urbauth id cookie. I run the following method: (use-modules (web client)(web response) (srfi srfi-9)(oop goops) (ice-9 receive) (ice-9 pretty-print)) (define (urbit-http-connect) (let* ((uri "ht

Re: error Wrong type to apply: #

2023-08-09 Thread Jean Abou Samra
Le mercredi 09 août 2023 à 11:42 +0200, Maxime Devos a écrit : > > > Op 09-08-2023 om 01:00 schreef Jean Abou Samra: > > Le mardi 08 août 2023 à 21:38 +0200, Maxime Devos a écrit : > > > As such, this not working on the top-level seems a bug to me -- after > > > all, a module definition is concep

Re: error Wrong type to apply: #

2023-08-09 Thread Maxime Devos
> [...] For reloadable modules, references to ‘top-level’ variables need to be done via a 'module-ref' equivalent instead of a direct (lexical) reference, but I think the compiler or expander could handle that without too much trouble (it does so already I think). OpenPGP_0x49E3EE22191725EE.

Re: error Wrong type to apply: #

2023-08-09 Thread Maxime Devos
Op 09-08-2023 om 01:00 schreef Jean Abou Samra: Le mardi 08 août 2023 à 21:38 +0200, Maxime Devos a écrit : As such, this not working on the top-level seems a bug to me -- after all, a module definition is conceptually just a big let: (if applicable) (let ()       (define ...)    (define