tags:

views:

17

answers:

2

I'm doing a pipe to retrieve RSS content from a private blogger's blog. The pipe first send a POST request to https://www.google.com/accounts/ClientLogin to get the Auth token. I use YQL for this (select * from htmlpost where url="https://www.google.com/accounts/ClientLogin" and postdata="Email=...). The question is, how could I set a custom header named "Authenticate" with the Auth token inside when retrieving the content of a web? I'm not experienced in YQL neither in yahoo pipes. I believe that what I'm trying is not possible. Any ideas?

A: 

One solution is to create a yql-table like this one made by myself and use it with a yql query like:

use "https://sites.google.com/site/myopentables/html.get.xml?attredirects=0&d=1" as html.get;
select * from html.get where url="someurl" and authorization="auth string";
Pedro
A: 

You would still have to write your own YQL datatable but instead of Pedro's answer I would suggest that you use YQL's built in paramType="header".

<key id="Authorization" as="authorization" type="xs:string" paramType="header" required="false" />

From the YQL documentation about the attributes to :

  • header: Add the id and its value as a id: value as an HTTP header to the URL request.
sspier