♻️ Refactor backend.

Move from custom vertx to jetty9.
This commit is contained in:
Andrey Antukh 2020-05-14 13:49:11 +02:00 committed by Alonso Torres
parent 1639e15975
commit 5a03c13731
82 changed files with 1763 additions and 4667 deletions

View file

@ -35,13 +35,15 @@
[{:keys [body headers auth method query url response-type]
:or {auth true response-type :text}}]
(let [headers (merge {"Accept" "application/transit+json,*/*"}
default-headers
(when (map? body) default-headers)
headers)
request {:method method
:url url
:headers headers
:query query
:body (when (not= :get method) (t/encode body))}
:body (if (map? body)
(t/encode body)
body)}
options {:response-type response-type
:credentials? auth}]
(http/send! request options)))