From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.227.24.3 with SMTP id t3csp43824wbb; Fri, 18 Oct 2013 10:39:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=dkim-signature:x-gm-message-state:mime-version:date:message-id :subject:from:to:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe:content-type; bh=GWv4W9K1MVcYkBW/Hhgz1a0RNup0xKIUUbIuyMR0K3w=; b=k5IqMXc8UborD/IAj2i4peZbaTjgxIVI5oSLy1580/ovMgC15H8NET5mWu1pHDW9mt 73Ahg2clIF5HjGBEw4BtGPlXVSuevN/nBgCLm1CPC6EEmA/WKLTywmgzJJecwuhFhyNh B0cwPGt01rYs6X3M+CCkRl1kZiP/BUt7doexp6ONwwDEs8cRTWd+AKsoD9Lfi6+/MgRs 8qY4I1tWRduErJzhfcAzJolxdu88UfuOgX98rJsXSGn5t/Qb84Enqa1eUyzxAbOLdkOV 9262ieeOSp+oaElVLr+9Jmd+OGMATlOz8Wc5RH5H6oTk5cAbw4klIXLr79P5URj2INcM iLnA== Return-Path: Received-SPF: pass (google.com: domain of rack-devel+bncBCBZDDWO4YPBBQ7EQWJQKGQEYDZRP4A@googlegroups.com designates 10.152.120.72 as permitted sender) client-ip=10.152.120.72 Authentication-Results: mr.google.com; spf=pass (google.com: domain of rack-devel+bncBCBZDDWO4YPBBQ7EQWJQKGQEYDZRP4A@googlegroups.com designates 10.152.120.72 as permitted sender) smtp.mail=rack-devel+bncBCBZDDWO4YPBBQ7EQWJQKGQEYDZRP4A@googlegroups.com; dkim=pass header.i=@googlegroups.com X-Received: from mr.google.com ([10.152.120.72]) by 10.152.120.72 with SMTP id la8mr431060lab.31.1382117956555 (num_hops = 1); Fri, 18 Oct 2013 10:39:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:date:message-id:subject:from:to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; bh=GWv4W9K1MVcYkBW/Hhgz1a0RNup0xKIUUbIuyMR0K3w=; b=nI9Y8wZheqPWqpXp4VtbJgVC7KWOq974fOK/yMMy0be2lxRnQ1Ttzj9Gk27a3yrxBL mvRFSMSIXrhZCH43s4cSJG9u9B2mSxcdMC5J/LtRUpIhMJu+aW7r4vWvWYPQFOKjBZtA EsJAHHff3fI8TAYCnT3pjAjHxxrL6pEGRWIR5XAIZrvOOGhBIUCMjqNUO2Ny/ooJzW+H OPJHwRSDNPyBrCzTOnXaV4grEqVlHo2JD2LACRTEhFJTC/tWh+gw4zXqbOIbOABChlki 1mwFQiy1E00+XUCFQa1Fr2sEgUwFz2C8mW6jXw4ZYEq8zQfRX9hUn1PoO+jkebo8Aldg iVBA== X-Received: by 10.152.120.72 with SMTP id la8mr43854lab.31.1382117956415; Fri, 18 Oct 2013 10:39:16 -0700 (PDT) X-BeenThere: rack-devel@googlegroups.com Received: by 10.152.25.232 with SMTP id f8ls300275lag.50.gmail; Fri, 18 Oct 2013 10:39:15 -0700 (PDT) X-Received: by 10.112.132.40 with SMTP id or8mr1809117lbb.16.1382117955282; Fri, 18 Oct 2013 10:39:15 -0700 (PDT) Received: from mail-ee0-f45.google.com (mail-ee0-f45.google.com [74.125.83.45]) by gmr-mx.google.com with ESMTPS id a1si612808ees.1.2013.10.18.10.39.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 10:39:15 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.45 is neither permitted nor denied by best guess record for domain of dblock@dblock.org) client-ip=74.125.83.45; Received: by mail-ee0-f45.google.com with SMTP id c50so2253029eek.32 for ; Fri, 18 Oct 2013 10:39:15 -0700 (PDT) X-Gm-Message-State: ALoCoQn6uagx++6i6dVEqqIOFCxtiKOzdr/i1X+U1k0FzZt5TCyeqWMh8K6qLfwcT4yDXE2+4Us8 MIME-Version: 1.0 X-Received: by 10.14.0.196 with SMTP id 44mr4348543eeb.93.1382117955170; Fri, 18 Oct 2013 10:39:15 -0700 (PDT) Received: by 10.14.4.131 with HTTP; Fri, 18 Oct 2013 10:39:15 -0700 (PDT) X-Originating-IP: [108.41.177.192] Date: Fri, 18 Oct 2013 13:39:15 -0400 Message-ID: Subject: transforming a rack response into a Goliath-compatible response From: Daniel Doubrovkine To: rack-devel@googlegroups.com X-Original-Sender: dblock@dblock.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 74.125.83.45 is neither permitted nor denied by best guess record for domain of dblock@dblock.org) smtp.mail=dblock@dblock.org Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: X-Google-Group-Id: 486215384060 List-Post: , List-Help: , List-Archive: Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: multipart/alternative; boundary=047d7b66ff3bc17f4204e9076943 --047d7b66ff3bc17f4204e9076943 Content-Type: text/plain; charset=ISO-8859-1 I am trying to integrate Grape + Goliath. >From Grape we get something like this: [200, {"Content-Type"=>"application/json", "Content-Length"=>"15"}, #"application/json", "Content-Length"=>"15"}, @chunked=false, @writer=#, @block=nil, @length=15, @body=["{\"ping\":\"pong\"}"]>, @block=#, @closed=false>] 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? Thanks, dB. -- dB. | Moscow - Geneva - Seattle - New York code.dblock.org - @dblockdotorg - artsy.net - github/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. --047d7b66ff3bc17f4204e9076943 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I am trying to integrate Grape + Goliath.

From Grape we get something like this:

[200, {&= quot;Content-Type"=3D>"application/json", "Content-L= ength"=3D>"15"}, #<Rack::BodyProxy:0x007fd606ea26d8 @b= ody=3D#<Rack::Response:0x007fd606e98430 @status=3D200, @header=3D{"= Content-Type"=3D>"application/json", "Content-Length= "=3D>"15"}, @chunked=3Dfalse, @writer=3D#<Proc:0x007fd= 606e98228@/Users/dblock/.rvm/gems/ruby-1.9.3-p385/gems/rack-1.5.2/lib/rack/= response.rb:27 (lambda)>, @block=3Dnil, @length=3D15, @body=3D["{\&= quot;ping\":\"pong\"}"]>, @block=3D#<Proc:0x007fd= 606ea2688@/Users/dblock/.rvm/gems/ruby-1.9.3-p385/gems/rack-1.5.2/lib/rack/= response.rb:79>, @closed=3Dfalse>]

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

Thanks,
dB.

--

dB. | Moscow - Geneva - Seattl= e - New York
code.dblock.org=A0-=A0@dblockdotorg=A0-=A0artsy.net=A0-=A0github/dblock

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