bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44906: [bug#49482] [PATCH 3/3] ci: Properly construct URLs.


From: Mathieu Othacehe
Subject: bug#44906: [bug#49482] [PATCH 3/3] ci: Properly construct URLs.
Date: Thu, 15 Jul 2021 09:35:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hello Hartmut,

Thanks for this patchset!

> +(define* (api-url base-url path #:rest query)
> +  "Build a proper API url, taking into account BASE_URL's trailing slashes."

s/BASE_URL/BASE-URL/

You could also indicate what is the expect format for query: '("name"
"value") lists.

> +        (((_ #f) . rest) (lp rest acc))
> +        (((name val) . rest)
> +         (lp rest (cons*
> +                   name "="
> +                   (if (string? val) (uri-encode val) (number->string val))

What about booleans? False is filtered above but true will throw an
exception.

> +    (resolve-uri-reference ref base)))
> +
> +

There's an extra new line here.

> +(define* (json-api-fetch base-url path #:rest query)
> +  (json-fetch (apply api-url base-url path query)))
> +
> +

Here also.

Otherwise, it looks nice :)

Thanks,

Mathieu





reply via email to

[Prev in Thread] Current Thread [Next in Thread]