rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / code / Atom feed
* transforming a rack response into a Goliath-compatible response
@ 2013-10-18 17:39 Daniel Doubrovkine
  2013-10-29  0:00 ` James Tucker
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Doubrovkine @ 2013-10-18 17:39 UTC (permalink / raw)
  To: rack-devel

[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]

I am trying to integrate Grape + Goliath.

From Grape we get something like this:

[200, {"Content-Type"=>"application/json", "Content-Length"=>"15"},
#<Rack::BodyProxy:0x007fd606ea26d8 @body=#<Rack::Response:0x007fd606e98430
@status=200, @header={"Content-Type"=>"application/json",
"Content-Length"=>"15"}, @chunked=false,
(lambda)>, @block=nil, @length=15, @body=["{\"ping\":\"pong\"}"]>,

What's the proper way to transform it into a Goliath-compatible response,
basically how do I cleanly translate a BodyProxy into a string body?



dB. | Moscow - Geneva - Seattle - New York
code.dblock.org - @dblockdotorg <http://twitter.com/#!/dblockdotorg> -
artsy.net - github/dblock <https://github.com/dblock>


You received this message because you are subscribed to the Google Groups "Rack Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rack-devel+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

[-- Attachment #2: Type: text/html, Size: 2182 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-29  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-18 17:39 transforming a rack response into a Goliath-compatible response Daniel Doubrovkine
2013-10-29  0:00 ` James Tucker

Code repositories for project(s) associated with this inbox:


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).