io.airlift.http.client.Request.getHeader()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(281)

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

Request.getHeader介绍

暂无

代码示例

代码示例来源:origin: prestodb/presto

  1. DataSize maxSize = DataSize.valueOf(request.getHeader(PrestoHeaders.PRESTO_MAX_SIZE));
  2. assertEquals(maxSize, expectedMaxSize);

代码示例来源:origin: io.airlift/http-client

  1. @Test
  2. public void testBasicAuthentication()
  3. throws Exception
  4. {
  5. Predicate<Request> predicate = request -> request.getUri().getPath().startsWith("/private");
  6. HttpRequestFilter filter = new BasicAuthRequestFilter(predicate, "Aladdin", "open sesame");
  7. Request publicResourceRequest = createTestRequest("/public");
  8. assertNull(filter.filterRequest(publicResourceRequest).getHeader(AUTHORIZATION));
  9. Request privateResourceRequest = createTestRequest("/private");
  10. assertEquals(filter.filterRequest(privateResourceRequest).getHeader(AUTHORIZATION), "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==");
  11. }

代码示例来源:origin: prestosql/presto

  1. DataSize maxSize = DataSize.valueOf(request.getHeader(PrestoHeaders.PRESTO_MAX_SIZE));
  2. assertEquals(maxSize, expectedMaxSize);

代码示例来源:origin: airlift/airlift

  1. @Test
  2. public void testBasicAuthentication()
  3. throws Exception
  4. {
  5. Predicate<Request> predicate = request -> request.getUri().getPath().startsWith("/private");
  6. HttpRequestFilter filter = new BasicAuthRequestFilter(predicate, "Aladdin", "open sesame");
  7. Request publicResourceRequest = createTestRequest("/public");
  8. assertNull(filter.filterRequest(publicResourceRequest).getHeader(AUTHORIZATION));
  9. Request privateResourceRequest = createTestRequest("/private");
  10. assertEquals(filter.filterRequest(privateResourceRequest).getHeader(AUTHORIZATION), "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==");
  11. }

代码示例来源:origin: io.prestosql/presto-main

  1. DataSize maxSize = DataSize.valueOf(request.getHeader(PrestoHeaders.PRESTO_MAX_SIZE));
  2. assertEquals(maxSize, expectedMaxSize);

代码示例来源:origin: uk.co.nichesolutions.presto/presto-main

  1. DataSize maxSize = DataSize.valueOf(request.getHeader(PrestoHeaders.PRESTO_MAX_SIZE));
  2. assertEquals(maxSize, expectedMaxSize);

相关文章