Answers for "clojure http/server-error?"

0

clojure http/server-error?

(require '[clj-http.client :as http])

(http/server-error? {:status 503})
;; throw NullPointerException if :status is absent from the argument
;; throw ClassCastException if :status value is not an Integer
;; returns true if :status value is 5xx
;; returns false otherwise
Posted by: Guest on January-20-2022

Browse Popular Code Answers by Language