<commit_before>#ifndef HTTPREQUESTHANDLER_H
#define HTTPREQUESTHANDLER_H

#include "cppCORE_global.h"
#include <QObject>
#include <QString>
#include <QSslError>
#include <QNetworkAccessManager>
#include <QHttpMultiPart>

using HttpHeaders = QMap<QByteArray, QByteArray>;

///Helper class for HTTP(S) communication with webserver
class CPPCORESHARED_EXPORT HttpRequestHandler
		: public QObject
{
	Q_OBJECT

public:
	///Proxy type
	enum ProxyType
	{
		SYSTEM, //from system settings
		INI, //from ini file
		NONE //no proxy
	};

	///Constructor<commit_msg>Added a class to handle URL parameters in API requests<commit_after>#ifndef HTTPREQUESTHANDLER_H
#define HTTPREQUESTHANDLER_H

#include "cppCORE_global.h"
#include <QObject>
#include <QString>
#include <QSslError>
#include <QNetworkAccessManager>
#include <QHttpMultiPart>

using HttpHeaders = QMap<QByteArray, QByteArray>;

struct CPPCORESHARED_EXPORT RequestUrlParams
		: public QMap<QByteArray, QByteArray>
{
	QString asString()
	{
		QString output;
		QMap<QByteArray, QByteArray>::iterator i;
		for (i = this->begin(); i != this->end(); ++i)
		{
			if (!output.isEmpty()) output += "&";
			output += i.key() + "=" + i.value();
		}
		return "?" + output;
	}
};

///Helper class for HTTP(S) communication with webserver
class CPPCORESHARED_EXPORT HttpRequestHandler
		: public QObject
{
	Q_OBJECT

public:
	///Proxy type
	enum ProxyType
	{
		SYSTEM, //from system settings
		INI, //from ini file
		NONE //no proxy
	};

	///Constructor
{'fraction_non_alphanumeric': 0.11804158283031523, 'fraction_numerical': 0.0, 'mean_word_length': 4.716475095785441, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, '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': '3700456', 'n_tokens_mistral': 536, 'n_tokens_neox': 507, 'n_words': 135}