本文整理了Java中org.apache.http.client.fluent.Request.Patch
方法的一些代码示例,展示了Request.Patch
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.Patch
方法的具体详情如下:
包路径:org.apache.http.client.fluent.Request
类名称:Request
方法名:Patch
暂无
代码示例来源:origin: dreamhead/moco
public String patchForResponse(final String url, final String content) throws IOException {
return executeAsString(Request.Patch(url)
.bodyString(content, ContentType.DEFAULT_TEXT));
}
代码示例来源:origin: mesosphere/dcos-commons
/**
* Update a secret.
*
* @param path path which contains an existing secret
* @param secret an updated secret definition
* @throws IOException if the update failed to complete
*/
public void update(String path, Payload secret) throws IOException {
Request httpRequest = Request.Patch(uriForPath(path))
.bodyString(OBJECT_MAPPER.writeValueAsString(secret), ContentType.APPLICATION_JSON);
query("update", path, httpRequest, HttpStatus.SC_NO_CONTENT);
}
代码示例来源:origin: mgtechsoftware/smockin
HttpClientResponseDTO patch(final HttpClientCallDTO reqDto) throws IOException {
final Request request = Request.Patch(reqDto.getUrl())
.bodyByteArray((reqDto.getBody() != null)?reqDto.getBody().getBytes():null);
return executeRequest(request, reqDto.getHeaders());
}
代码示例来源:origin: mgtechsoftware/smockin
public static HttpClientResponseDTO patch(final HttpClientCallDTO reqDto) throws IOException {
final Request request = Request.Patch(reqDto.getUrl())
.bodyByteArray((reqDto.getBody() != null)?reqDto.getBody().getBytes():null);
return executeRequest(request, reqDto.getHeaders());
}
内容来源于网络,如有侵权,请联系作者删除!