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

edn-xhr expects a body. put and post request often don't have one #2

Open
mathiasp opened this issue Mar 17, 2014 · 1 comment
Open

Comments

@mathiasp
Copy link

I'm not a cljs expert, but from my understanding edn-xhr allways expects a body. edn/read-string throws an exeption otherwise.

Since typical put/post requests do not have a body (e.g. they respond with 201 created, 204 no content and location/etag), this has been problematic for me. I now return the changed data as seems to be expected by om-sync.

I normally would only want to reload the just posted resource if the server signals that someone else edited it. And that would be more a case of rolling back the application state and then to possibly offer to merge / look at the changes. But my current needs don't go that far...

Sorry for my bad english, I'm not a native speaker and quite tired allready.

I truly enjoy working with om and om-sync!

Cheers, Mathias

@swannodette
Copy link
Owner

@mathiasp sorry for the slow reply on this. What exactly do you suggest? A pull request is most welcome!

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