reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
matheusashton 2021-05-05T01:32:00.223600Z

Hi, I'm using ring-jetty-adapter with reitit.ring and muuntaja to handle json requests, but after configuring:

{:data {:muuntaja m/instance
                        ;; :coercion schema/coercion
                        :middleware [ring.middleware.reload/wrap-reload
                                     muuntaja/format-middleware
                                     ;; reitit.ring.coercion/coerce-request-middleware
                                     ;; reitit.ring.coercion/coerce-response-middleware
                                     [wrap-deps deps]]}
and printing a request body, I'm getting
#object[org.eclipse.jetty.server.HttpInputOverHTTP 0x378295b6 "HttpInputOverHTTP@378295b6[c=36,q=0,[0]=null,s=STREAM]"]
am I doing something wrong?

matheusashton 2021-05-05T01:34:08.224200Z

I should be receiving a map converted from request's json body right?

2021-05-05T12:55:44.225600Z

Hi @matheusashton You can find the decoded request body in :body-params. From the format-middleware docstring: > if the :body-params doesn't already exist. Decodes the request body into :body-params using the :muuntaja/request key in request

🙌 1
kenny 2021-05-05T15:49:57.226900Z

I am using muuntaja for request and response content type negotiation. Is there a built-in or recommended way to return a nice error if the content-type header is not specified or specifies an unsupported type?

West 2021-05-05T21:46:53.228500Z

Hey guys, I need some help. I’m trying to use reitit frontend, but for some reason, when I click on a link, the url updates, but the page doesn’t change. Why could that be?

West 2021-05-05T21:48:08.228600Z

West 2021-05-05T21:48:57.229Z

This seems to work just fine, but my code won’t work. I feel like it might be obvious, but I’ve been so stumped by this problem.