Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the library in ClojureScript and self-host? #21

Open
arichiardi opened this issue Aug 8, 2018 · 4 comments
Open

Using the library in ClojureScript and self-host? #21

arichiardi opened this issue Aug 8, 2018 · 4 comments

Comments

@arichiardi
Copy link

I am evaluating this lib for usage in constructing responses from my CLJS lambda functions but I have noticed that the main file is a http_response.clj is .clj file.

Is this something you folks would be willing to change? I could try to work on something that works on both ClojureScript and self-host for instance.

It would basically importing things from macchiato or copy over the bits it needs from ring instead of referring the vars.

What do you think?

@ikitommi
Copy link
Member

ikitommi commented Aug 9, 2018

I think it's a great idea to have common/cljc abstractions for simple things like http responses. There are at least two friendly copies out there, macchiato being one.

The ring.util.http-response is intended to be a drop-in-replacement for ring.util.response, so all the extra functions should be there. Copying those instead of referring to vars is a good idea, and would give two dependencies less. PR most welcome.

@arichiardi
Copy link
Author

arichiardi commented Aug 9, 2018

I am glad you referred to macchiato because that's exactly what I contributed to yesterday: https://github.com/macchiato-framework/macchiato-http 😄

@ikitommi
Copy link
Member

Are you happy with that or would you like to still port this to cljc?

@arichiardi
Copy link
Author

To be honest I have always liked this API slightly better...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants