From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.229.37.72 with SMTP id w8cs189442qcd; Wed, 21 Sep 2011 04:22:21 -0700 (PDT) Return-Path: Received-SPF: pass (google.com: domain of rack-devel+bncCLezhvm7GBDqkefzBBoE-v0jkQ@googlegroups.com designates 10.229.91.79 as permitted sender) client-ip=10.229.91.79; Authentication-Results: mr.google.com; spf=pass (google.com: domain of rack-devel+bncCLezhvm7GBDqkefzBBoE-v0jkQ@googlegroups.com designates 10.229.91.79 as permitted sender) smtp.mail=rack-devel+bncCLezhvm7GBDqkefzBBoE-v0jkQ@googlegroups.com; dkim=pass header.i=rack-devel+bncCLezhvm7GBDqkefzBBoE-v0jkQ@googlegroups.com Received: from mr.google.com ([10.229.91.79]) by 10.229.91.79 with SMTP id l15mr189458qcm.25.1316604141321 (num_hops = 1); Wed, 21 Sep 2011 04:22:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:mime-version:date:user-agent:x-http-useragent :message-id:subject:from:to:x-original-sender:reply-to:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe:content-type; bh=xeSKu+caSTKp0eG/qgdQF4XT89IXrYLecjnW8q77pSM=; b=wfSZZm0ZIm+EtHjkem1YOXuLEs9k/2OsxZSU6gJi9KnPiFlwCd8KJEaEm2mjseITjN HXtJAoYIumVHWDn60G/Rt7hLY1p7y9OQpNEqX4zRtIO0LqbrfZdalfUSfGxz12BkfbSd bJ+MW8BY2PKfaZhx/hb20iRW93TWy/Ly4ILcY= Received: by 10.229.91.79 with SMTP id l15mr59335qcm.25.1316604138726; Wed, 21 Sep 2011 04:22:18 -0700 (PDT) X-BeenThere: rack-devel@googlegroups.com Received: by 10.224.199.7 with SMTP id eq7ls2630639qab.3.gmail; Wed, 21 Sep 2011 04:22:17 -0700 (PDT) Received: by 10.224.200.2 with SMTP id eu2mr515296qab.21.1316604137686; Wed, 21 Sep 2011 04:22:17 -0700 (PDT) Received: by 10.224.8.197 with SMTP id i5msqai; Wed, 21 Sep 2011 04:14:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.39.66 with SMTP id f2mr106571vce.5.1316603648764; Wed, 21 Sep 2011 04:14:08 -0700 (PDT) Received: by 15g2000vbb.googlegroups.com with HTTP; Wed, 21 Sep 2011 04:14:08 -0700 (PDT) Date: Wed, 21 Sep 2011 04:14:08 -0700 (PDT) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Ubuntu/11.04 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30,gzip(gfe) Message-ID: <04c877d2-ef50-48a5-a32e-267f5e9bfd82@15g2000vbb.googlegroups.com> Subject: Constructing and parsing 'Link' header From: dave To: Rack Development X-Original-Sender: dwilkie@gmail.com 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: text/plain; charset=ISO-8859-1 Hi, I've just been reading Steve's blog post here: http://blog.steveklabnik.com/2011/08/07/some-people-understand-rest-and-http.html about good RESTful api's. He mentions that it's a good idea to use the 'Link' header to specify links to associated resources so that clients don't have to construct their url's. Is there a standard way to construct and parse these heading in Rack? I was thinking something like this for Rails apps: request.links = [{:link => public_gists_url, :rel => "public_gists"}, {:link => repos_url, :rel => "repos"}, {:link => gists_url, :rel => "gists"} ] which would product the following header: Link: ; rel="public_gists", ; rel="repos", ; rel="gists" Would this be a welcome edition to rack/contrib?