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

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

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

HttpRequest.append介绍

[英]Append given map as query parameters to the base URL

Each map entry's key will be a parameter name and the value's Object#toString() will be the parameter value.
[中]将给定的映射作为查询参数附加到基本URL
每个映射条目的键将是一个参数名,值的对象#toString()将是参数值。

代码示例

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

/**
 * Start a 'POST' 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 post(final CharSequence baseUrl,
                final Map<?, ?> params, final boolean encode) {
  String url = append(baseUrl, params);
  return post(encode ? encode(url) : url);
}

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

/**
 * Start a 'DELETE' 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 delete(final CharSequence baseUrl,
                 final Map<?, ?> params, final boolean encode) {
  String url = append(baseUrl, params);
  return delete(encode ? encode(url) : url);
}

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

/**
 * Start a 'PUT' 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 put(final CharSequence baseUrl,
               final Map<?, ?> params, final boolean encode) {
  String url = append(baseUrl, params);
  return put(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: lkorth/httpebble-android

/**
 * Start a 'GET' 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 get(final CharSequence baseUrl,
               final Map<?, ?> params, final boolean encode) {
  String url = append(baseUrl, params);
  return get(encode ? encode(url) : url);
}

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

/**
 * Start a 'POST' 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 post(final CharSequence baseUrl,
                final boolean encode, final Object... params) {
  String url = append(baseUrl, params);
  return post(encode ? encode(url) : url);
}

代码示例来源: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 'PUT' 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 put(final CharSequence baseUrl,
               final boolean encode, final Object... params) {
  String url = append(baseUrl, params);
  return put(encode ? encode(url) : url);
}

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

/**
 * Start a 'DELETE' 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 delete(final CharSequence baseUrl,
                 final boolean encode, final Object... params) {
  String url = append(baseUrl, params);
  return delete(encode ? encode(url) : url);
}

代码示例来源: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 get(final CharSequence baseUrl,
               final boolean encode, final Object... params) {
  String url = append(baseUrl, params);
  return get(encode ? encode(url) : url);
}

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

/**
 * Start a 'POST' 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 post(final CharSequence baseUrl,
                final Map<?, ?> params, final boolean encode) {
  String url = append(baseUrl, params);
  return post(encode ? encode(url) : url);
}

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

/**
 * Start a 'POST' 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 post(final CharSequence baseUrl,
  final Map<?, ?> params, final boolean encode) {
 String url = append(baseUrl, params);
 return post(encode ? encode(url) : url);
}

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

/**
 * Start a 'PUT' 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 put(final CharSequence baseUrl,
  final Map<?, ?> params, final boolean encode) {
 String url = append(baseUrl, params);
 return put(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 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 get(final CharSequence baseUrl,
  final Map<?, ?> params, final boolean encode) {
 String url = append(baseUrl, params);
 return get(encode ? encode(url) : url);
}

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

/**
 * Start a 'DELETE' 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 delete(final CharSequence baseUrl,
                 final Map<?, ?> params, final boolean encode) {
  String url = append(baseUrl, params);
  return delete(encode ? encode(url) : url);
}

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

/**
 * Start a 'POST' 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 post(final CharSequence baseUrl,
  final Map<?, ?> params, final boolean encode) {
 String url = append(baseUrl, params);
 return post(encode ? encode(url) : url);
}

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

/**
 * Start a 'PUT' 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 put(final CharSequence baseUrl,
  final Map<?, ?> params, final boolean encode) {
 String url = append(baseUrl, params);
 return put(encode ? encode(url) : url);
}

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

/**
 * Start a 'DELETE' 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 delete(final CharSequence baseUrl,
  final Map<?, ?> params, final boolean encode) {
 String url = append(baseUrl, params);
 return delete(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 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 get(final CharSequence baseUrl,
  final Map<?, ?> params, final boolean encode) {
 String url = append(baseUrl, params);
 return get(encode ? encode(url) : url);
}

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

/**
 * Start a 'GET' 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 get(final CharSequence baseUrl,
               final Map<?, ?> params, final boolean encode) {
  String url = append(baseUrl, params);
  return get(encode ? encode(url) : url);
}

相关文章

HttpRequest类方法