              data (get-incoming-data context)
              frame (if (empty? data)
                      {}
-                     (decode data content-type))]
+                     (-decode data content-type))]
          (dispatch handler context content-type frame))
        (catch Exception e
          (http/unsupported-mediatype (str e)))))))

;; Data encoding/decoding
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defmulti decode
  (fn [data content-type]
    content-type))

(defmulti encode
  (fn [data content-type]
    content-type))

(defmethod decode :application/transit+json
  [data _]
  (sz/decode ^bytes data :transit+json))

(defmethod encode :application/transit+json
  [data _]
  (sz/encode data :transit+json))


  (-handle-response-message [data content-type]
    (try
      (-> (normalize-frame data)
          (-encode content-type)
          (frame->http content-type))
      (catch Throwable error
        (-> (-adapt-exception error)
            (-encode content-type)
            (frame->http content-type)))))

  CompletableFuture
