org.apache.http.client.fluent.Request.Patch()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(217)

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

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

相关文章