Fork me on GitHub
#pedestal
<
2020-03-25
>
yiorgos12:03:51

@ddeaguiar that worked great, just for the reference just in case someone else faces the same problem. here are the changes

(def logger
  (interceptor/on-request
   ::log-request
   (fn [request]
     (log/info :msg request)
     request)))

(def service-map
  {::http/type :jetty
   ::http/resource-path "/public"
   ::http/port 3001
   ::http/routes r/routes
   ::http/request-logger logger}) ;; <----- update the default logger with a custom one

ddeaguiar12:03:58

Great! At some point I’ll update the Default Interceptors docs to make overriding clearer

👍 8
yiorgos12:03:31

I have a plain html form and I am rendering it with Semler the body of the request looks like this :body #object[org.eclipse.jetty.server.HttpInputOverHTTP 0x3747fe8b "[email protected][c=0,q=0,[0]=null,s=STREAM]"] how can I parse that? the content type is “application/x-www-form-urlencoded

ddeaguiar12:03:41

@U051XTEJB take a look at the body params interceptor

👍 4