<commit_before><?php<commit_msg>add http method<commit_after><?php

function oauth_http($method,$header,$url,$data){
	$method = $method ? $method : 'get';
	if( $method == 'get') {
		$ch = curl_init ();
		curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
		curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, TRUE );
		curl_setopt ( $ch, CURLOPT_URL, $url );
		$result = curl_exec ( $ch );
		curl_close ( $ch );
		return $result;
	
	} elseif ( $method == 'post' ) {
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
    curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, TRUE );
    curl_setopt ( $ch, CURLOPT_POST, TRUE );
    curl_setopt ( $ch, CURLOPT_POSTFIELDS, $data );
    curl_setopt ( $ch, CURLOPT_URL, $url );
    curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    $ret = curl_exec ( $ch );
    curl_close ( $ch );
    return $ret;
	
	}

}	
{'fraction_non_alphanumeric': 0.16568742655699178, 'fraction_numerical': 0.0, 'mean_word_length': 4.195121951219512, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1819128', 'n_tokens_mistral': 358, 'n_tokens_neox': 328, 'n_words': 67}