本文整理了Java中com.github.kevinsawicki.http.HttpRequest.intHeader()
方法的一些代码示例,展示了HttpRequest.intHeader()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpRequest.intHeader()
方法的具体详情如下:
包路径:com.github.kevinsawicki.http.HttpRequest
类名称:HttpRequest
方法名:intHeader
[英]Get an integer header from the response falling back to returning -1 if the header is missing or parsing fails
[中]如果报头丢失或解析失败,则从返回-1的响应中获取整数报头
代码示例来源:origin: com.github.kevinsawicki/http-request
/**
* Get an integer header from the response falling back to returning -1 if the
* header is missing or parsing fails
*
* @param name
* @return header value as an integer, -1 when missing or parsing fails
* @throws HttpRequestException
*/
public int intHeader(final String name) throws HttpRequestException {
return intHeader(name, -1);
}
代码示例来源:origin: lkorth/httpebble-android
/**
* Get the 'Content-Length' header from the response
*
* @return response header value
*/
public int contentLength() {
return intHeader(HEADER_CONTENT_LENGTH);
}
代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse
/**
* Get an integer header from the response falling back to returning -1 if the
* header is missing or parsing fails
*
* @param name
* @return header value as an integer, -1 when missing or parsing fails
* @throws HttpRequestException
*/
public int intHeader(final String name) throws HttpRequestException {
return intHeader(name, -1);
}
代码示例来源:origin: tcking/GiraffePlayer2
/**
* Get the 'Content-Length' header from the response
*
* @return response header value
*/
public int contentLength() {
return intHeader(HEADER_CONTENT_LENGTH);
}
代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse
/**
* Get the 'Content-Length' header from the response
*
* @return response header value
*/
public int contentLength() {
return intHeader(HEADER_CONTENT_LENGTH);
}
代码示例来源:origin: com.github.kevinsawicki/http-request
/**
* Get the 'Content-Length' header from the response
*
* @return response header value
*/
public int contentLength() {
return intHeader(HEADER_CONTENT_LENGTH);
}
代码示例来源:origin: tcking/GiraffePlayer2
/**
* Get an integer header from the response falling back to returning -1 if the
* header is missing or parsing fails
*
* @param name
* @return header value as an integer, -1 when missing or parsing fails
* @throws HttpRequestException
*/
public int intHeader(final String name) throws HttpRequestException {
return intHeader(name, -1);
}
代码示例来源:origin: lkorth/httpebble-android
/**
* Get an integer header from the response falling back to returning -1 if the
* header is missing or parsing fails
*
* @param name
* @return header value as an integer, -1 when missing or parsing fails
* @throws HttpRequestException
*/
public int intHeader(final String name) throws HttpRequestException {
return intHeader(name, -1);
}
内容来源于网络,如有侵权,请联系作者删除!