當前位置: 首頁>>代碼示例>>Java>>正文


Java AutoRedirectingWire類代碼示例

本文整理匯總了Java中com.jcabi.http.wire.AutoRedirectingWire的典型用法代碼示例。如果您正苦於以下問題:Java AutoRedirectingWire類的具體用法?Java AutoRedirectingWire怎麽用?Java AutoRedirectingWire使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AutoRedirectingWire類屬於com.jcabi.http.wire包,在下文中一共展示了AutoRedirectingWire類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: AuthByPass

import com.jcabi.http.wire.AutoRedirectingWire; //導入依賴的package包/類
/**
 * Public ctor, with a custom req.
 *
 * @param uri Hub URI
 * @param req Request to start from
 */
public AuthByPass(
    final URI uri,
    final Request req) {
    this.uri = uri;
    this.req = req.header(HttpHeaders.USER_AGENT, AuthByPass.USER_AGENT)
        .through(AutoRedirectingWire.class)
        .uri()
        .path("/hub/api/rest/oauth2/token")
        .back()
        .method(Request.POST)
        .header(
            HttpHeaders.CONTENT_TYPE,
            "application/x-www-form-urlencoded"
        );
}
 
開發者ID:smallcreep,項目名稱:jb-hub-client,代碼行數:22,代碼來源:Auth.java

示例2: RtHub

import com.jcabi.http.wire.AutoRedirectingWire; //導入依賴的package包/類
/**
 * Public ctor, with a custom req.
 *
 * @param req Request to start from
 */
public RtHub(
    final Request req) {
    this.req = req.header(HttpHeaders.USER_AGENT, RtHub.USER_AGENT)
        .through(AutoRedirectingWire.class)
        .uri()
        .path("/hub/api/rest")
        .back();
}
 
開發者ID:smallcreep,項目名稱:jb-hub-client,代碼行數:14,代碼來源:RtHub.java


注:本文中的com.jcabi.http.wire.AutoRedirectingWire類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。