Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 05 2020 20:34
    bonkydog closed #175
  • Nov 05 2020 20:34
    bonkydog commented #175
  • Jul 28 2020 08:47
    ordnungswidrig closed #71
  • Jul 10 2020 13:21
    casseds2 commented #312
  • Jul 10 2020 13:10
    ordnungswidrig assigned #312
  • Jul 10 2020 13:10
    ordnungswidrig commented #312
  • Jul 10 2020 09:37
    elenacanovi commented #312
  • Jul 09 2020 15:07
    casseds2 commented #312
  • May 05 2020 12:30
    tggreene commented #319
  • May 05 2020 07:51
    ordnungswidrig commented #319
  • May 04 2020 18:47
    tggreene commented #319
  • May 03 2020 21:32
    ordnungswidrig commented #319
  • May 03 2020 21:12
    ordnungswidrig commented #319
  • May 03 2020 12:33
    tggreene edited #319
  • May 03 2020 12:31
    tggreene edited #319
  • May 03 2020 12:26
    tggreene opened #319
  • Apr 29 2020 17:41
    alexanderkiel closed #220
  • Mar 04 2020 20:32
    zendevil edited #318
  • Mar 04 2020 20:31
    zendevil edited #318
  • Mar 04 2020 20:25
    zendevil edited #318
Philipp Meier
@ordnungswidrig
Hello. World.
Hans Hübner
@hanshuebner
hello philipp
i've just joined because, well, it was a click away. my coworker tried to use liberator and it worked at first, but then somewhat failed for him which made him go back to ring + middlewares like i do.
but i'm curious anyway.
Philipp Meier
@ordnungswidrig
Great. „a click away“ is the elevator pith for Gitter, I guess. I stumbled over gitter today and wanted to see if it’s something useful for an open source project.
Andy Chambers
@cddr
Gitter seems pretty cool. I like how you can see github activity down the right
Hans Hübner
@hanshuebner
andy, long time no see! :) say hello to karen, too
Andy Chambers
@cddr
Hans! Karen says "Wie Gehts" :smile: What are you up to with liberator?
Hans Hübner
@hanshuebner
Andy, we've made some attempts with liberator in one of our search oriented services, but did not find it to be a great fit for non-CRUD type services. We're planning other services, though, and will try liberator again with those that are more suitable for a real ReSTful framework. How about you?
Philipp Meier
@ordnungswidrig
hans, I would be interessted how liberator wasn’t a good fit. I’m sketching the future evolution of liberator’s interface and this would be valuable input for me.
Hans Hübner
@hanshuebner
We just found liberator to be too complex for the simple needs that we had. It was actually my coworker who used it, and he found it difficult to debug problems that he had.
I think for simple needs, liberator is too big. But of course, often simple things evolve into complex and then one regrets not having used the proper tools in the beginning :)
Philipp Meier
@ordnungswidrig
Oh, the debugging story. Yes that is an issue and might repell newbies. Intrestingly I find liberator especially usefull for quick and small stuff because of all the defaults :-)
But that might depend on your story, the PUT/POST path is not super well supported, yet, if it comes to processing the request entity (body).
Hans Hübner
@hanshuebner
I think if liberator was easier to debug, it would help a lot. It is a compelling library to use for beginners (like my coworker) but for them, it is hard to make progress once the sh*t hits the fan somehow.
And of course, this is as much a clojure issue as it might be a liberator issue.
Philipp Meier
@ordnungswidrig
Point taken. In the meanwhile we need to direct them to this Gitter chat :-)
Hans Hübner
@hanshuebner
Right! I'll stay and reach out when I'm running into issues with my next project (which I hope to start real soon now).
Hans Hübner
@hanshuebner
Today is the day where i'll try to use liberator as the front end to the Datomic based thing that I've been working on :)
Hans Hübner
@hanshuebner
The documentation states "While If-Modified-Since requires that the clocks of client and server are sufficiently in sync", which is not the case.
If-Modified-Since does not require the clocks of the client and the server to be in sync, but as it works only on 1 second granularity due to the time format used, it is not suitable for resources that change frequently and it can even fail with rarely changing resources if two updates happen in the same second and the client fetches the first version of that second.
Right there, the tutorial also says " A resource can generate an ETag by providing a function at the key :etag", but the example shows just some code snippet, not a function. What is the context in which that piece of code is evaluated? I will need to look at the request to determine the etag, so a contextless expression won't really do, I guess.
Hans Hübner
@hanshuebner
I'm guessing that the argument to :etag is just a function of one argument, the context. The tutorial could be clearer about that.
Hans Hübner
@hanshuebner
For my current application, liberator works very well, thanks!
Hans Hübner
@hanshuebner
Here is a real question, though: We're using clj-time (maybe wrongly, as it hurts us everywhere), but the json serialization of liberator does not know how to deal with clj-time instances. Is there a way to make this work?
Hans Hübner
@hanshuebner
Well, apparently, liberator also cannot deal with java.util.Time. This will be a roadblock for us
Hans Hübner
@hanshuebner
I've seen clojure-liberator/liberator#71 - That'll do for me.
Philipp Meier
@ordnungswidrig
@hanshuebner the simples way to plug in custom represenation generation for JSON is to provide a custom function at :as-responsewhich should accept the data returned by a handler and the context. You can check the media-type in (get-in ctx [:represenation :media-type]) and if it’s json call your json library of choice. For the other media types you can delegate to liberator.representation/as-response.
Philipp Meier
@ordnungswidrig
Hans Hübner
@hanshuebner
Nice, thanks!