本文整理汇总了Java中com.squareup.okhttp.internal.http.OkHeaders.toMultimap方法的典型用法代码示例。如果您正苦于以下问题:Java OkHeaders.toMultimap方法的具体用法?Java OkHeaders.toMultimap怎么用?Java OkHeaders.toMultimap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.squareup.okhttp.internal.http.OkHeaders
的用法示例。
在下文中一共展示了OkHeaders.toMultimap方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getHeaderFields
import com.squareup.okhttp.internal.http.OkHeaders; //导入方法依赖的package包/类
public final Map<String, List<String>> getHeaderFields() {
try {
return OkHeaders.toMultimap(getHeaders(), StatusLine.get(getResponse().getResponse())
.toString());
} catch (IOException e) {
return Collections.emptyMap();
}
}
示例2: getRequestProperties
import com.squareup.okhttp.internal.http.OkHeaders; //导入方法依赖的package包/类
public final Map<String, List<String>> getRequestProperties() {
if (!this.connected) {
return OkHeaders.toMultimap(this.requestHeaders.build(), null);
}
throw new IllegalStateException("Cannot access request header fields after connection is " +
"set");
}
示例3: getHeaderFields
import com.squareup.okhttp.internal.http.OkHeaders; //导入方法依赖的package包/类
@Override public final Map<String, List<String>> getHeaderFields() {
try {
return OkHeaders.toMultimap(getHeaders(),
StatusLine.get(getResponse().getResponse()).toString());
} catch (IOException e) {
return Collections.emptyMap();
}
}
示例4: getRequestProperties
import com.squareup.okhttp.internal.http.OkHeaders; //导入方法依赖的package包/类
@Override public final Map<String, List<String>> getRequestProperties() {
if (connected) {
throw new IllegalStateException(
"Cannot access request header fields after connection is set");
}
return OkHeaders.toMultimap(requestHeaders.build(), null);
}
示例5: extractJavaHeaders
import com.squareup.okhttp.internal.http.OkHeaders; //导入方法依赖的package包/类
/**
* Extracts an immutable request header map from the supplied {@link com.squareup.okhttp.Headers}.
*/
static Map<String, List<String>> extractJavaHeaders(Request request) {
return OkHeaders.toMultimap(request.headers(), null);
}
示例6: getHeaderFields
import com.squareup.okhttp.internal.http.OkHeaders; //导入方法依赖的package包/类
@Override
public Map<String, List<String>> getHeaderFields() {
return OkHeaders.toMultimap(response.headers(), StatusLine.get(response).toString());
}