<commit_before>package requests

import (
	"errors"
	"net/http"
	"net/url"
)

const (
	Version = "1.0"
)

var (
	sessionWithoutCookies *session
)

func init() {
	client := &http.Client{}
	s := &session{Client: client}
	s.cookies = make(map[string]string)
	sessionWithoutCookies = s
}

// Parse url params or body params. Usually the callers intend to get application/x-www-form-urlencoded format of the params
func parseParams(params map[string][]string) url.Values {
	v := url.Values{}
	for key, values := range params {
		for _, value := range values {
			v.Add(key, value)
		}
	}
	return v
}

// Parse the headers, with some default values added
func parseHeaders(headers map[string][]string) http.Header {
	h := http.Header{}
	for key, values := range headers {
		for _, value := range values {
			h.Add(key, value)
		}
	}
	_, hasAccept := h["Accept"]
	if !hasAccept {
		h.Add("Accept", "*/*")<commit_msg>set default ignore cert verify<commit_after>package requests

import (
	"errors"
	"net/http"
	"net/url"
	"crypto/tls"
)

const (
	Version = "1.0"
)

var (
	sessionWithoutCookies *session
)

func init() {
	tr := &http.Transport{
		TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
	}
	client := &http.Client{Transport: tr}
	s := &session{Client: client}
	s.cookies = make(map[string]string)
	sessionWithoutCookies = s
}

// Parse url params or body params. Usually the callers intend to get application/x-www-form-urlencoded format of the params
func parseParams(params map[string][]string) url.Values {
	v := url.Values{}
	for key, values := range params {
		for _, value := range values {
			v.Add(key, value)
		}
	}
	return v
}

// Parse the headers, with some default values added
func parseHeaders(headers map[string][]string) http.Header {
	h := http.Header{}
	for key, values := range headers {
		for _, value := range values {
			h.Add(key, value)
		}
	}
	_, hasAccept := h["Accept"]
	if !hasAccept {
		h.Add("Accept", "*/*")
{'fraction_non_alphanumeric': 0.14227015921931177, 'fraction_numerical': 0.002054442732408834, 'mean_word_length': 3.8944723618090453, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5839911', 'n_tokens_mistral': 695, 'n_tokens_neox': 670, 'n_words': 189}