Fork me on GitHub
robert-stuttaford07:04:08 has the match being placed in the request under :reitit.core/match. however, there's no indication of which handler is being called - :get, :post, etc. - in the match data that is put there. does this mean that i'm expected to inspect the request's :request-method myself, or is it perhaps an oversight that the match doesn't include this info?


The impl uses request-method. The route match happens first without considering request-method, then the reitit ring adapter checks if the match has a handler fn for that method.


ok great, so basically this injection of the match happens before the request-method stuff is dealt with, cool


thanks for the quick response!


I think the injection still happens after this (the next line), but the match data was constructed without considering the method. There isn't a reason why method couldn't be added to match, but I guess it just wasn't considered as the reitit-core version doesn't know anything about method anyway.


I get this error after upgrading from reitit 0.5.2 to 0.5.18, any advice?


0.5.15 works, but 0.5.16 breaks with this error. Seems to be swagger ui related


Hi. This PUT request throws a null pointer exception, and I can't figure out why?

:put {:tags ["Data set"]
      :summary "Update data set"
      :parameters {:path :econdata.utilities.spec/datasets-path-params
                   :multipart {:file multipart/temp-file-part}}
      :handler (constantly {:status 200})}


Changing the method to a POST request returns status 200 OK


I am using the latest Reitit


I don’t know off the top of my head, but some questions I would ask myself are: (1) what middleware is being used? (2) what are the different ways that POST and PUT are handled by reitit and/or the middleware, for example, is there an expectation of a :body that is not being supplied, producing the null pointer exception? Those are some things I would check. Good luck!

👍 1

Thanks I will definitely try your advice


You were spot on, it was a custom middleware I had written that was misbehaving. Thanks for the help. A false clue led me to waste hours on what should have been a simple fix T_T