com.github.kevinsawicki.http.HttpRequest.intHeader()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中com.github.kevinsawicki.http.HttpRequest.intHeader()方法的一些代码示例,展示了HttpRequest.intHeader()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpRequest.intHeader()方法的具体详情如下:
包路径:com.github.kevinsawicki.http.HttpRequest
类名称:HttpRequest
方法名:intHeader

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);
}

相关文章

微信公众号

最新文章

更多

HttpRequest类方法