API.java 文件源码

java
阅读 34 收藏 0 点赞 0 评论 0

项目:aerodrome-for-jet 作者:
/**
 * Retrieves the status and version number information from the response
 * @param response Response to pull data from
 */
private IAPIResponse createResponseObject( final HttpResponse response, final byte[] content, final String charset )
{
  final RedirectLocations locations = ((RedirectLocations)context.getAttribute( HttpClientContext.REDIRECT_LOCATIONS ));

  final List<URI> redirectLocations = new ArrayList<>();
  if ( locations != null )
  {
    redirectLocations.addAll( locations.getAll());
  }

  return new APIResponse(
    response.getProtocolVersion(),
    response.getStatusLine(),
    new ArrayList<>( Arrays.asList( response.getAllHeaders())),
    redirectLocations,
    content,
    charset
  );
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号