#! /bin/bash

test_name="Method Test"

config_file="./Tester/test1.config"
port=4040
host="localhost"

paths=("/")	# you can add many
methods=("GET" "POST" "DELETE" "GUMBALL")
#methods=("GET")
httpz=("HTTP/1.1")




# the parts we will send to webserv





header="Host: $host\n"
header+="Nonsense: fu\n"

#header_cycle=("Transfer-encoding: fu" "Content-encoding: fu")

body=


run_this_test()
{
	
	for i in "${methods[@]}"
	do
		l1="$i ${paths[0]} ${httpz[0]}"
		request="$l1\n$header\n$body\n"
		{
			echo "----- $test_name -----"
			echo -e "$_RED$request$_END"
		} >> telnet.log
		echo -e "$request"
		sleep 1
		echo -e "\n\n" >> telnet.log
	done

}



# expected result...

files=()

file="expected_method_test.txt"
files+=("expected_method_test.txt")
#files+=("expected_path_root_test.txt")


local_expected_test_files=()
test_path=""

add_path()
{
	for i in "${files[@]}"
	do
		local_expected_test_files+=("$test_path$i")
	done
}

#add_path









