src/Tools.java
public static HashMap<String, String> SetupRequestHeaders(String[] i_RequestHeaders) throws IllegalArgumentException {
		HashMap<String, String> responseDictionary = new HashMap<String, String>();
		for (String header :  i_RequestHeaders) {
			String[] splitted = header.split(": ");
			if (splitted.length != 2) {
				throw new IllegalArgumentException();
			}
			responseDictionary.put(splitted[0], splitted[1]);
		}
		return responseDictionary;
	}
/*
	 * Create dictionary from the request according to headers
	 */
Create dictionary from the request according to headers
Create dictionary from the request according to headers
public static HashMap<String, String> SetupRequestHeaders(String[] i_RequestHeaders) throws IllegalArgumentException {
		HashMap<String, String> responseDictionary = new HashMap<String, String>();
		for (String header :  i_RequestHeaders) {
			String[] splitted = header.split(": ");
			if (splitted.length != 2) {
				throw new IllegalArgumentException();
			}
			responseDictionary.put(splitted[0], splitted[1]);
		}
		return responseDictionary;
	}
public static HashMap < String , String > SetupRequestHeaders ( String [ ] i_RequestHeaders ) throws IllegalArgumentException { HashMap < String , String > responseDictionary = new HashMap < String , String > ( ) ; for ( String header : i_RequestHeaders ) { String [ ] splitted = header . split ( ": " ) ; if ( splitted . length != 2 ) { throw new IllegalArgumentException ( ) ; } responseDictionary . put ( splitted [ 0 ] , splitted [ 1 ] ) ; } return responseDictionary ; }
Create dictionary from the request according to headers
Create dictionary from the request according to headers