本文整理了Java中com.github.kevinsawicki.http.HttpRequest.put()
方法的一些代码示例,展示了HttpRequest.put()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpRequest.put()
方法的具体详情如下:
包路径:com.github.kevinsawicki.http.HttpRequest
类名称:HttpRequest
方法名:put
[英]Start a 'PUT' request to the given URL
[中]启动对给定URL的“PUT”请求
代码示例来源: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 '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: 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.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: tcking/GiraffePlayer2
/**
* 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.github.kevinsawicki/http-request
/**
* 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
*
* @see #append(CharSequence, Object...)
* @see #encode(CharSequence)
*
* @return request
*/
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: tcking/GiraffePlayer2
/**
* 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
*
* @see #append(CharSequence, Object...)
* @see #encode(CharSequence)
*
* @return request
*/
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: com.restfuse/com.eclipsesource.restfuse
/**
* 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
*
* @see #append(CharSequence, String...)
* @see #encode(CharSequence)
*
* @return request
*/
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: SINTEF-9012/cloudml
/**
* This method upload the deployment model in the monitoring manager
*
* @param model the state of the deployment
*/
public void uploadDeployment(Model model){
String url = address + "/" + version + "/model/resources";
int result;
Gson gson = new GsonBuilder().serializeNulls().create();
String json = gson.toJson(model);
try {
journal.log(Level.INFO, ">> Connecting to the monitoring platform at "+address+"...");
result = HttpRequest.put(url).send(json).code();
printComponentname(model);
} catch (Exception e) {
result = 0;
}
printResult(result);
}
代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse
public Response put() {
HttpRequest request = HttpRequest.put( url );
addContentType( request );
addHeaders( request );
addAuthentication( request );
request.send( content );
sendRequest( request );
return new ResponseImpl( request );
}
代码示例来源:origin: no.cantara.base/Hystrix-BaseCommands
request = HttpRequest.put(uriString, true, getQueryParameters());
} else {
request = HttpRequest.put(uriString);
内容来源于网络,如有侵权,请联系作者删除!