<commit_before>package handlers_test

import (
	"net/http"
	"net/http/httptest"
	"net/url"
	"strconv"
	"strings"
	"testing"

	"github.com/danielsoro/qrcode-generate/handlers"
	"github.com/gin-gonic/gin"
)

func shouldReturnAByteArray(t *testing.T) {
	r := gin.New()
	r.Use(gin.Recovery())
	r.POST("/qrcode", handlers.QrcodeHandler)

	params := url.Values{}
	params.Add("url", "https://www.tomitribe.com")

	req, _ := http.NewRequest("POST", "/qrcode", strings.NewReader(params.Encode()))
	req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
	req.Header.Add("Content-Length", strconv.Itoa(len(params)))

	w := httptest.NewRecorder()
	r.ServeHTTP(w, req)

	if w.Code != http.StatusOK {
		t.Fail()
	}
}<commit_msg>Updated Content-Type<commit_after>package handlers_test

import (
	"net/http"
	"net/http/httptest"
	"net/url"
	"strconv"
	"strings"
	"testing"

	"github.com/danielsoro/qrcode-generate/handlers"
	"github.com/gin-gonic/gin"
)

func shouldReturnAByteArray(t *testing.T) {
	r := gin.New()
	r.Use(gin.Recovery())
	r.POST("/qrcode", handlers.QrcodeHandler)

	params := url.Values{}
	params.Add("url", "https://www.tomitribe.com")

	req, _ := http.NewRequest("POST", "/qrcode", strings.NewReader(params.Encode()))
	req.Header.Add("Content-Type", "application/json")
	req.Header.Add("Content-Length", strconv.Itoa(len(params)))

	w := httptest.NewRecorder()
	r.ServeHTTP(w, req)

	if w.Code != http.StatusOK {
		t.Fail()
	}
}
{'fraction_non_alphanumeric': 0.19390581717451524, 'fraction_numerical': 0.0, 'mean_word_length': 4.78, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 3, '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': '4002499', 'n_tokens_mistral': 603, 'n_tokens_neox': 579, 'n_words': 79}