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

Question about content_types_accepted #81

Open
hadils opened this issue Jan 7, 2018 · 4 comments
Open

Question about content_types_accepted #81

hadils opened this issue Jan 7, 2018 · 4 comments

Comments

@hadils
Copy link

hadils commented Jan 7, 2018

I have need for the following code:

  method content_types_accepted rd =
    Wm.continue [
      ("application/json;domain-type=Provision", self#provision_facility);
      ("application/json;domain-type=Activate",  self#activate_facility);
      ("application/json;domain-type=Deactivate", self#deactivate_facility);
    ] rd

The purpose is to implement a RESTful interface for CQRS. I need to dispatch on the different domain types independently of the verb used.

Any suggestions? I am new to webmachine, so I am sure I am missing something...

Thanks,
Hadil

@hadils
Copy link
Author

hadils commented Jan 7, 2018

Additional details. I get a 415 -- Unsupported media type when trying to use PUT with the activate case above. I checked RFC 7231 and it seems that this is legal syntax.

@tmcgilchrist
Copy link
Contributor

tmcgilchrist commented Jan 8, 2018 via email

@hadils
Copy link
Author

hadils commented Jan 8, 2018 via email

@seliopou
Copy link
Member

seliopou commented Jan 9, 2018 via email

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

No branches or pull requests

3 participants