CreatedResponse for JSON

27 views
Skip to first unread message

silves89

unread,
May 18, 2011, 11:01:38 AM5/18/11
to Lift
I'd like to use CreatedResponse to confirm the creation of a resource
after an HTTP PUT. So far I'm only using JSON for my RESTful interface
but CreatedResponse takes a Node, not a JObject (would that be
right?). I'd rather not serialize the object to XML just for this
response - I'd probably use another Response type before doing that.

CreatedResponse extends XmlNodeResponse - is there a reason we
shouldn't have a CreatedResponse that extends JsonResponse, or
something similar?

Thanks!

David Pollak

unread,
May 18, 2011, 11:46:20 AM5/18/11
to lif...@googlegroups.com
On Wed, May 18, 2011 at 8:01 AM, silves89 <jamescole.uk@gmail.com> wrote:
I'd like to use CreatedResponse to confirm the creation of a resource
after an HTTP PUT. So far I'm only using JSON for my RESTful interface
but CreatedResponse takes a Node, not a JObject (would that be
right?). I'd rather not serialize the object to XML just for this
response - I'd probably use another Response type before doing that.

Sure.  Please open a ticket at http://ticket.liftweb.net (you must be a watcher of the LiftWeb space on Assembla to open tickets).
 

CreatedResponse extends XmlNodeResponse - is there a reason we
shouldn't have a CreatedResponse that extends JsonResponse, or
something similar?

Thanks!

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.




--
Lift, the simply functional web framework http://liftweb.net

silves89

unread,
May 19, 2011, 4:17:24 AM5/19/11
to Lift
Ok, done:
https://www.assembla.com/spaces/liftweb/tickets/1014-a-new-createdresponse-that-takes-json

I'll use an OkResponse for now.

On May 18, 4:46 pm, David Pollak <feeder.of.the.be...@gmail.com>
wrote:
> On Wed, May 18, 2011 at 8:01 AM, silves89 <jamescole...@gmail.com> wrote:
> > I'd like to use CreatedResponse to confirm the creation of a resource
> > after an HTTP PUT. So far I'm only using JSON for my RESTful interface
> > but CreatedResponse takes a Node, not a JObject (would that be
> > right?). I'd rather not serialize the object to XML just for this
> > response - I'd probably use another Response type before doing that.
>
> Sure.  Please open a ticket athttp://ticket.liftweb.net(you must be a
> watcher of the LiftWeb space on Assembla to open tickets).
>
>
>
>
>
>
>
>
>
>
>
> > CreatedResponse extends XmlNodeResponse - is there a reason we
> > shouldn't have a CreatedResponse that extends JsonResponse, or
> > something similar?
>
> > Thanks!
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Lift" group.
> > To post to this group, send email to lif...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > liftweb+u...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/liftweb?hl=en.
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Simply Lifthttp://simply.liftweb.net
Reply all
Reply to author
Forward
0 new messages