Skip to content

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

@mathiasp

Description

@mathiasp

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions