开发者

How to set a custom header using Yahoo Pipes?

I'm doing a pipe to 开发者_如何学Goretrieve 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?


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";


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜