Welcome to the CHICKEN Scheme pasting service
Exception handling done wrong added by zilti on Thu Apr 20 11:57:55 2023
(handle-exceptions
exn (logger (sprintf "Exception has been thrown: ~A ~A" exn ((condition-property-accessor '(exn http client-error) 'body) e)))
(with-input-from-request
(make-request #:method 'POST
#:headers (headers `((Authorization #(,(sprintf "bearer ~A" (alist-ref tokenblob 'access_token)) raw))
(Content-Type application/json)))
#:uri (uri-reference "https://graph.microsoft.com/v1.0/drive/root/subscriptions"))
(lambda () (json->string `((changeType . "updated")
(notificationUrl . ,(sprintf "https://~A/onedrive-webhook" domain))
(resource . "/me/drive/root")
(expirationDateTime . "2024-01-01T01:01:00.000Z")
(clientState . "client-specific string"))))
read-json))