<commit_before>#!/usr/bin/python
import pprint

def generate_script(header_dict, details_dict):
	
	method = details_dict['method'].strip()
	host = details_dict['Host']
	headers = str(header_dict)

        if method == 'POST':
		skeleton_code = '''
		#!/usr/bin/env bash
		curl --request POST '''+host+''' --header '''+headers+''' --include
                '''
        elif method == 'GET':
		skeleton_code = '''
		#!/usr/bin/env bash
		curl --request GET '''+host+''' --header '''+headers+''' --include
		'''
        elif method == 'PUT':
		skeleton_code = '''
		#!/usr/bin/env bash
		curl --request PUT '''+host+''' --header '''+headers+''' --include
                '''
        elif method == 'DELETE':
		skeleton_code = '''
		#!/usr/bin/env bash
		curl --request DELETE '''+host+''' --header '''+headers+''' --include
                '''
	print (skeleton_code)<commit_msg>Fixed headers that weren't getting passed properly.<commit_after>#!/usr/bin/python
import pprint
import re

def generate_script(header_dict, details_dict):
	
	method = details_dict['method'].strip()
	host = details_dict['Host']
	headers = str(header_dict)
	a = re.sub(r"{|}","",headers)
	b = re.sub(r"': '"," : ",a)
	c = re.sub(r"', '","\" --header \"",b)
	formattedHeaders = re.sub(r"\'","\"",c)

        if method == 'POST':
		skeleton_code = '''
		#!/usr/bin/env bash
		curl -v --request POST '''+host+''' --header '''+headers+''' --include
                '''
        elif method == 'GET':
		skeleton_code = '''
		#!/usr/bin/env bash
		curl -v --request GET '''+host+''' --header '''+formattedHeaders+''' --include
		'''
        elif method == 'PUT':
		skeleton_code = '''
		#!/usr/bin/env bash
		curl -v --request PUT '''+host+''' --header '''+headers+''' --include
                '''
        elif method == 'DELETE':
		skeleton_code = '''
		#!/usr/bin/env bash
		curl -v --request DELETE '''+host+''' --header '''+headers+''' --include
                '''
	print (skeleton_code)
{'fraction_non_alphanumeric': 0.22346938775510203, 'fraction_numerical': 0.0, 'mean_word_length': 2.7281368821292777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3816397', 'n_tokens_mistral': 706, 'n_tokens_neox': 636, 'n_words': 154}