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

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

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

HttpRequest.head介绍

[英]Start a 'HEAD' request to the given URL
[中]启动对给定URL的“HEAD”请求

代码示例

代码示例来源:origin: lkorth/httpebble-android

/**
 * Start a 'GET' request to the given URL along with the query params
 *
 * @param baseUrl
 * @param encode  true to encode the full URL
 * @param params  the name/value query parameter pairs to include as part of the
 *                baseUrl
 * @return request
 * @see #append(CharSequence, String...)
 * @see #encode(CharSequence)
 */
public static HttpRequest head(final CharSequence baseUrl,
                final boolean encode, final Object... params) {
  String url = append(baseUrl, params);
  return head(encode ? encode(url) : url);
}

代码示例来源:origin: lkorth/httpebble-android

/**
 * Start a 'HEAD' request to the given URL along with the query params
 *
 * @param baseUrl
 * @param params  The query parameters to include as part of the baseUrl
 * @param encode  true to encode the full URL
 * @return request
 * @see #append(CharSequence, Map)
 * @see #encode(CharSequence)
 */
public static HttpRequest head(final CharSequence baseUrl,
                final Map<?, ?> params, final boolean encode) {
  String url = append(baseUrl, params);
  return head(encode ? encode(url) : url);
}

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

/**
 * Start a 'GET' request to the given URL along with the query params
 *
 * @param baseUrl
 * @param encode
 *          true to encode the full URL
 * @param params
 *          the name/value query parameter pairs to include as part of the
 *          baseUrl
 *
 * @see #append(CharSequence, String...)
 * @see #encode(CharSequence)
 *
 * @return request
 */
public static HttpRequest head(final CharSequence baseUrl,
  final boolean encode, final Object... params) {
 String url = append(baseUrl, params);
 return head(encode ? encode(url) : url);
}

代码示例来源:origin: com.github.kevinsawicki/http-request

/**
 * Start a 'HEAD' request to the given URL along with the query params
 *
 * @param baseUrl
 * @param params
 *          The query parameters to include as part of the baseUrl
 * @param encode
 *          true to encode the full URL
 *
 * @see #append(CharSequence, Map)
 * @see #encode(CharSequence)
 *
 * @return request
 */
public static HttpRequest head(final CharSequence baseUrl,
  final Map<?, ?> params, final boolean encode) {
 String url = append(baseUrl, params);
 return head(encode ? encode(url) : url);
}

代码示例来源:origin: tcking/GiraffePlayer2

/**
 * Start a 'HEAD' request to the given URL along with the query params
 *
 * @param baseUrl
 * @param params
 *          The query parameters to include as part of the baseUrl
 * @param encode
 *          true to encode the full URL
 *
 * @see #append(CharSequence, Map)
 * @see #encode(CharSequence)
 *
 * @return request
 */
public static HttpRequest head(final CharSequence baseUrl,
                final Map<?, ?> params, final boolean encode) {
  String url = append(baseUrl, params);
  return head(encode ? encode(url) : url);
}

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

/**
 * Start a 'HEAD' request to the given URL along with the query params
 *
 * @param baseUrl
 * @param params
 *          The query parameters to include as part of the baseUrl
 * @param encode
 *          true to encode the full URL
 *
 * @see #append(CharSequence, Map)
 * @see #encode(CharSequence)
 *
 * @return request
 */
public static HttpRequest head(final CharSequence baseUrl,
  final Map<?, ?> params, final boolean encode) {
 String url = append(baseUrl, params);
 return head(encode ? encode(url) : url);
}

代码示例来源:origin: com.github.kevinsawicki/http-request

/**
 * Start a 'GET' request to the given URL along with the query params
 *
 * @param baseUrl
 * @param encode
 *          true to encode the full URL
 * @param params
 *          the name/value query parameter pairs to include as part of the
 *          baseUrl
 *
 * @see #append(CharSequence, Object...)
 * @see #encode(CharSequence)
 *
 * @return request
 */
public static HttpRequest head(final CharSequence baseUrl,
  final boolean encode, final Object... params) {
 String url = append(baseUrl, params);
 return head(encode ? encode(url) : url);
}

代码示例来源:origin: tcking/GiraffePlayer2

/**
 * Start a 'GET' request to the given URL along with the query params
 *
 * @param baseUrl
 * @param encode
 *          true to encode the full URL
 * @param params
 *          the name/value query parameter pairs to include as part of the
 *          baseUrl
 *
 * @see #append(CharSequence, Object...)
 * @see #encode(CharSequence)
 *
 * @return request
 */
public static HttpRequest head(final CharSequence baseUrl,
                final boolean encode, final Object... params) {
  String url = append(baseUrl, params);
  return head(encode ? encode(url) : url);
}

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

public Response head() {
 HttpRequest request = HttpRequest.head( url );
 addContentType( request );
 addHeaders( request );
 addAuthentication( request );
 sendRequest( request );
 return new ResponseImpl( request );
}

相关文章

微信公众号

最新文章

更多

HttpRequest类方法