2010-09-03 28 views
0

我正在做一個管道從私人博客的博客檢索RSS內容。 管道首先發送POST請求到https://www.google.com/accounts/ClientLogin以獲取Auth令牌。我爲此使用YQL(select * from htmlpost where url="https://www.google.com/accounts/ClientLogin" and postdata="Email=...)。 問題是,在檢索Web內容時,如何使用Auth令牌在內部設置名爲「Authenticate」的自定義標頭? 我沒有在YQL管道中遇到YQL。我相信我所嘗試的是不可能的。有任何想法嗎?如何使用Yahoo Pipes設置自定義標題?

回答

1

一種解決方案是創建一個YQL表像this one採用自制,用YQL查詢喜歡使用它:

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

你仍然要編寫自己的YQL數據表,但不是佩德羅的答案我建議你使用YQL內置的paramType =「header」

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

YQL documentation有關屬性:

  • 頭:添加ID和其作爲一個ID值:值作爲HTTP標頭添加到URL請求。
相關問題