io.sphere.sdk.http.HttpResponse.getAssociatedRequest()方法的使用及代码示例

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

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

HttpResponse.getAssociatedRequest介绍

暂无

代码示例

代码示例来源:origin: commercetools/commercetools-jvm-sdk

public static SphereInternalLogger getLogger(final HttpResponse response) {
  final String firstPathElement = Optional.ofNullable(response.getAssociatedRequest())
      .map(r -> getPathElement(r)).orElse("endpoint-unknown");
  final String lastPathElement = Optional.ofNullable(response.getAssociatedRequest())
      .map(r -> requestOrCommandScopeSegment(r)).orElse("execution-type-unknown");
  return getLogger(firstPathElement + ".responses." + lastPathElement);
}

代码示例来源:origin: io.sphere.jvmsdk/common

public static SphereInternalLogger getLogger(final HttpResponse response) {
  final String firstPathElement = response.getAssociatedRequest()
      .map(r -> getFirstPathElement(r)).orElse("endpoint-unknown");
  final String lastPathElement = response.getAssociatedRequest()
      .map(r -> requestOrCommandScopeSegment(r.getHttpMethod())).orElse("execution-type-unknown");
  return getLogger(firstPathElement + ".responses." + lastPathElement);
}

代码示例来源:origin: io.sphere.sdk.jvm/common

public static SphereInternalLogger getLogger(final HttpResponse response) {
  final String firstPathElement = response.getAssociatedRequest()
      .map(r -> getPathElement(r)).orElse("endpoint-unknown");
  final String lastPathElement = response.getAssociatedRequest()
      .map(r -> requestOrCommandScopeSegment(r.getHttpMethod())).orElse("execution-type-unknown");
  return getLogger(firstPathElement + ".responses." + lastPathElement);
}

相关文章