Groups
Conversations
All groups and messages
Send feedback to Google
Help
Training
Sign in
Groups
restfulie
Conversations
About
Custom MIME Type
7 views
Skip to first unread message
Oliver
unread,
Aug 23, 2011, 3:24:15 PM
8/23/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to restfulie
Hi guys
I am trying to use a custom MIME type, something like "application/
vnd.myapp+json", could you please tell me what do I need to do to
support it?
I've been searching the restfulie wiki and this forum, but I haven't
found a solution.
Do I need to add a helper to Hypertemplate?
Do I need to call acts_as_restfulie in my model and then register the
media type?
I'd appreciate your help.
Thanks.
Anthony Roux
unread,
Aug 25, 2011, 3:35:21 AM
8/25/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rest...@googlegroups.com
Hello,
You can set the content type directly in the header with the method "as"
#Set Content-Type and Accept headers
def as(content_type)
headers['Content-Type'] = content_type
accepts(content_type)
end
->
Restfulie.at('
http://caelum.com.br/orders').as('application/vnd_caelum_order+xml').create(order
)
Example on this page:
https://github.com/caelum/restfulie/wiki/ruby_client
Anthony.
2011/8/23 Oliver
<
olyv...@gmail.com
>
Reply all
Reply to author
Forward
0 new messages