rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / code / Atom feed
From: Daniel Doubrovkine <dblock@dblock.org>
To: rack-devel@googlegroups.com
Subject: transforming a rack response into a Goliath-compatible response
Date: Fri, 18 Oct 2013 13:39:15 -0400	[thread overview]
Message-ID: <CALCE7p=71wVRiv8N1UKBp8zScUAxZB8zosvDCzNk_pAHxLpfyw@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2013-10-18 17:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 17:39 Daniel Doubrovkine [this message]
2013-10-29  0:00 ` James Tucker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALCE7p=71wVRiv8N1UKBp8zScUAxZB8zosvDCzNk_pAHxLpfyw@mail.gmail.com' \
    --to=rack-devel@googlegroups.com \
    --subject='Re: transforming a rack response into a Goliath-compatible response' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).