test_class.file: karate-core/src/test/java/com/intuit/karate/http/HttpUtilsTest.java
test_class.identifier: HttpUtilsTest
test_case.body: @Test
      public void testParseCookieString() {
          String header = "Set-Cookie: foo=\"bar\";Version=1";
          Map<String, Cookie> map = HttpUtils.parseCookieHeaderString(header);
          Match.equals(map, "{ foo: '#object' }"); // only one entry
          Match.contains(map.get("foo"), "{ name: 'foo', value: 'bar' }");
      }
test_case.class_method_signature: HttpUtilsTest.testParseCookieString()
test_case.full_signature: @Test public void testParseCookieString()
test_case.identifier: testParseCookieString
test_case.invocations: parseCookieHeaderString equals contains get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testParseCookieString()
focal_class.declarator: HEADER_CONTENT_TYPE = "Content-Type"
focal_class.modifier: public static final
focal_class.original_string: public static final String HEADER_CONTENT_TYPE = "Content-Type";
focal_class.type: String
focal_class.var_name: HEADER_CONTENT_TYPE
focal_class.declarator: HEADER_CONTENT_LENGTH = "Content-Length"
focal_class.modifier: public static final
focal_class.original_string: public static final String HEADER_CONTENT_LENGTH = "Content-Length";
focal_class.type: String
focal_class.var_name: HEADER_CONTENT_LENGTH
focal_class.declarator: HEADER_ACCEPT = "Accept"
focal_class.modifier: public static final
focal_class.original_string: public static final String HEADER_ACCEPT = "Accept";
focal_class.type: String
focal_class.var_name: HEADER_ACCEPT
focal_class.declarator: HEADER_ALLOW = "Allow"
focal_class.modifier: public static final
focal_class.original_string: public static final String HEADER_ALLOW = "Allow";
focal_class.type: String
focal_class.var_name: HEADER_ALLOW
focal_class.declarator: HEADER_AC_ALLOW_ORIGIN = "Access-Control-Allow-Origin"
focal_class.modifier: public static final
focal_class.original_string: public static final String HEADER_AC_ALLOW_ORIGIN = "Access-Control-Allow-Origin";
focal_class.type: String
focal_class.var_name: HEADER_AC_ALLOW_ORIGIN
focal_class.declarator: HEADER_AC_ALLOW_METHODS = "Access-Control-Allow-Methods"
focal_class.modifier: public static final
focal_class.original_string: public static final String HEADER_AC_ALLOW_METHODS = "Access-Control-Allow-Methods";
focal_class.type: String
focal_class.var_name: HEADER_AC_ALLOW_METHODS
focal_class.declarator: HEADER_AC_REQUEST_HEADERS = "Access-Control-Request-Headers"
focal_class.modifier: public static final
focal_class.original_string: public static final String HEADER_AC_REQUEST_HEADERS = "Access-Control-Request-Headers";
focal_class.type: String
focal_class.var_name: HEADER_AC_REQUEST_HEADERS
focal_class.declarator: HEADER_AC_ALLOW_HEADERS = "Access-Control-Allow-Headers"
focal_class.modifier: public static final
focal_class.original_string: public static final String HEADER_AC_ALLOW_HEADERS = "Access-Control-Allow-Headers";
focal_class.type: String
focal_class.var_name: HEADER_AC_ALLOW_HEADERS
focal_class.declarator: CHARSET = "charset"
focal_class.modifier: public static final
focal_class.original_string: public static final String CHARSET = "charset";
focal_class.type: String
focal_class.var_name: CHARSET
focal_class.declarator: PRINTABLES = {"json", "xml", "text", "urlencoded", "html"}
focal_class.modifier: private static final
focal_class.original_string: private static final String[] PRINTABLES = {"json", "xml", "text", "urlencoded", "html"};
focal_class.type: String[]
focal_class.var_name: PRINTABLES
focal_class.declarator: HTTP_METHODS
              = Stream.of("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD", "CONNECT", "TRACE")
                      .collect(Collectors.toSet())
focal_class.modifier: public static final
focal_class.original_string: public static final Set<String> HTTP_METHODS
              = Stream.of("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD", "CONNECT", "TRACE")
                      .collect(Collectors.toSet());
focal_class.type: Set<String>
focal_class.var_name: HTTP_METHODS
focal_class.declarator: DEFAULT_PATH_SCORE = Collections.unmodifiableList(Arrays.asList(0, 0, 0))
focal_class.modifier: public static final
focal_class.original_string: public static final List<Integer> DEFAULT_PATH_SCORE = Collections.unmodifiableList(Arrays.asList(0, 0, 0));
focal_class.type: List<Integer>
focal_class.var_name: DEFAULT_PATH_SCORE
focal_class.declarator: TEMPLATE_PARSER_CACHE = new ConcurrentHashMap<>()
focal_class.modifier: private static final
focal_class.original_string: private static final Map<String, UriTemplateParser> TEMPLATE_PARSER_CACHE = new ConcurrentHashMap<>();
focal_class.type: Map<String, UriTemplateParser>
focal_class.var_name: TEMPLATE_PARSER_CACHE
focal_class.declarator: BOUNDARY_COUNTER = new AtomicInteger()
focal_class.modifier: private static final
focal_class.original_string: private static final AtomicInteger BOUNDARY_COUNTER = new AtomicInteger();
focal_class.type: AtomicInteger
focal_class.var_name: BOUNDARY_COUNTER
focal_class.file: karate-core/src/main/java/com/intuit/karate/http/HttpUtils.java
focal_class.identifier: HttpUtils
focal_class.class_method_signature: HttpUtils.HttpUtils()
focal_class.full_signature: private  HttpUtils()
focal_class.identifier: HttpUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  HttpUtils()
focal_class.class_method_signature: HttpUtils.getKeyStore(ScenarioContext context, String trustStoreFile, String password, String type)
focal_class.full_signature: public static KeyStore getKeyStore(ScenarioContext context, String trustStoreFile, String password, String type)
focal_class.identifier: getKeyStore
focal_class.modifiers: public static
focal_class.parameters: (ScenarioContext context, String trustStoreFile, String password, String type)
focal_class.return: KeyStore
focal_class.signature: KeyStore getKeyStore(ScenarioContext context, String trustStoreFile, String password, String type)
focal_class.class_method_signature: HttpUtils.isPrintable(String mediaType)
focal_class.full_signature: public static boolean isPrintable(String mediaType)
focal_class.identifier: isPrintable
focal_class.modifiers: public static
focal_class.parameters: (String mediaType)
focal_class.return: boolean
focal_class.signature: boolean isPrintable(String mediaType)
focal_class.class_method_signature: HttpUtils.parseContentTypeCharset(String mimeType)
focal_class.full_signature: public static Charset parseContentTypeCharset(String mimeType)
focal_class.identifier: parseContentTypeCharset
focal_class.modifiers: public static
focal_class.parameters: (String mimeType)
focal_class.return: Charset
focal_class.signature: Charset parseContentTypeCharset(String mimeType)
focal_class.class_method_signature: HttpUtils.parseContentTypeParams(String mimeType)
focal_class.full_signature: public static Map<String, String> parseContentTypeParams(String mimeType)
focal_class.identifier: parseContentTypeParams
focal_class.modifiers: public static
focal_class.parameters: (String mimeType)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> parseContentTypeParams(String mimeType)
focal_class.class_method_signature: HttpUtils.getContentType(ScriptValue sv)
focal_class.full_signature: public static String getContentType(ScriptValue sv)
focal_class.identifier: getContentType
focal_class.modifiers: public static
focal_class.parameters: (ScriptValue sv)
focal_class.return: String
focal_class.signature: String getContentType(ScriptValue sv)
focal_class.class_method_signature: HttpUtils.parseCookieHeaderString(String header)
focal_class.full_signature: public static Map<String, Cookie> parseCookieHeaderString(String header)
focal_class.identifier: parseCookieHeaderString
focal_class.modifiers: public static
focal_class.parameters: (String header)
focal_class.return: Map<String, Cookie>
focal_class.signature: Map<String, Cookie> parseCookieHeaderString(String header)
focal_class.class_method_signature: HttpUtils.createCookieHeaderValue(Collection<Cookie> cookies)
focal_class.full_signature: public static String createCookieHeaderValue(Collection<Cookie> cookies)
focal_class.identifier: createCookieHeaderValue
focal_class.modifiers: public static
focal_class.parameters: (Collection<Cookie> cookies)
focal_class.return: String
focal_class.signature: String createCookieHeaderValue(Collection<Cookie> cookies)
focal_class.class_method_signature: HttpUtils.parseUriPattern(String pattern, String url)
focal_class.full_signature: public static Map<String, String> parseUriPattern(String pattern, String url)
focal_class.identifier: parseUriPattern
focal_class.modifiers: public static
focal_class.parameters: (String pattern, String url)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> parseUriPattern(String pattern, String url)
focal_class.class_method_signature: HttpUtils.getUriParserForPattern(String pattern)
focal_class.full_signature: private static UriTemplateParser getUriParserForPattern(String pattern)
focal_class.identifier: getUriParserForPattern
focal_class.modifiers: private static
focal_class.parameters: (String pattern)
focal_class.return: UriTemplateParser
focal_class.signature: UriTemplateParser getUriParserForPattern(String pattern)
focal_class.class_method_signature: HttpUtils.normaliseUriPath(String uri)
focal_class.full_signature: public static final String normaliseUriPath(String uri)
focal_class.identifier: normaliseUriPath
focal_class.modifiers: public static final
focal_class.parameters: (String uri)
focal_class.return: String
focal_class.signature: String normaliseUriPath(String uri)
focal_class.class_method_signature: HttpUtils.calculatePathMatchScore(String path)
focal_class.full_signature: public static List<Integer> calculatePathMatchScore(String path)
focal_class.identifier: calculatePathMatchScore
focal_class.modifiers: public static
focal_class.parameters: (String path)
focal_class.return: List<Integer>
focal_class.signature: List<Integer> calculatePathMatchScore(String path)
focal_class.class_method_signature: HttpUtils.generateMimeBoundaryMarker()
focal_class.full_signature: public static String generateMimeBoundaryMarker()
focal_class.identifier: generateMimeBoundaryMarker
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String generateMimeBoundaryMarker()
focal_class.class_method_signature: HttpUtils.multiPartToString(List<MultiPartItem> items, String boundary)
focal_class.full_signature: public static String multiPartToString(List<MultiPartItem> items, String boundary)
focal_class.identifier: multiPartToString
focal_class.modifiers: public static
focal_class.parameters: (List<MultiPartItem> items, String boundary)
focal_class.return: String
focal_class.signature: String multiPartToString(List<MultiPartItem> items, String boundary)
focal_method.body: public static Map<String, Cookie> parseCookieHeaderString(String header) {
          List<HttpCookie> list = HttpCookie.parse(header);
          Map<String, Cookie> map = new HashMap(list.size());
          list.forEach((hc) -> {
              String name = hc.getName();
              Cookie c = new Cookie(name, hc.getValue());
              c.putIfValueNotNull(Cookie.DOMAIN, hc.getDomain());
              c.putIfValueNotNull(Cookie.PATH, hc.getPath());
              c.putIfValueNotNull(Cookie.VERSION, hc.getVersion() + "");
              c.putIfValueNotNull(Cookie.MAX_AGE, hc.getMaxAge() + "");
              c.putIfValueNotNull(Cookie.SECURE, hc.getSecure() + "");
              map.put(name, c);
          });
          return map;
      }
focal_method.class_method_signature: HttpUtils.parseCookieHeaderString(String header)
focal_method.full_signature: public static Map<String, Cookie> parseCookieHeaderString(String header)
focal_method.identifier: parseCookieHeaderString
focal_method.invocations: parse size forEach getName getValue putIfValueNotNull getDomain putIfValueNotNull getPath putIfValueNotNull getVersion putIfValueNotNull getMaxAge putIfValueNotNull getSecure put
focal_method.modifiers: public static
focal_method.parameters: (String header)
focal_method.return: Map<String, Cookie>
focal_method.signature: Map<String, Cookie> parseCookieHeaderString(String header)