Mercurial > core / lisp/lib/pod/util.lisp
changeset 698: |
96958d3eb5b0 |
parent: |
9fa3b9154bb2
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Fri, 04 Oct 2024 22:04:59 -0400 |
permissions: |
-rw-r--r-- |
description: |
fixes |
1 ;; lib/pod/util.lisp --- Pod utilities 8 (defun decode-podman-response (buf)) 10 (defun encode-podman-request (obj)) 13 ;; assumes socket-connect was already called 14 (defun format-libpod-api-local (path) 15 (format nil "http://localhost/v~a/libpod/~a" *libpod-api-version* path)) 17 (defun libpod-request (client path &optional (method :get) timeout) 18 (let ((stream (socket-make-stream client 23 ;; TODO 2024-04-01: remove dependencies 24 (let ((wrapped-stream (flexi-streams:make-flexi-stream (chunga::make-chunked-stream stream) 25 :external-format :utf8))) 26 (req:request (format-libpod-api-local path) 28 :stream wrapped-stream 29 :connect-timeout #1=(or timeout t) 32 (defun libpod-request-json (client path &optional (method :get) timeout) 33 (dat/json:json-decode (libpod-request client path method timeout))) 35 ;; (libpod-request-json *client* "_ping") 36 ;; (libpod-request-json *client* "info") 37 ;; (libpod-request-json *client* "events") 38 ;; (libpod-request-json *client* "version") 39 ;; (libpod-request-json *client* "containers/json")