<commit_before>riot = require \riot

spinner = null
api-stack = 0

net = riot.observable!

riot.mixin \net do
	net: net

module.exports = (i, endpoint, data) ->
	api-stack++

	if typeof i == \object then i = i._web

	body = []

	for k, v of data
		if v != undefined
			v = encodeURIComponent v
			body.push "#k=#v"

	if i?
		body.push "_i=#i"

	web = (endpoint.index-of '://') > -1

	opts =<commit_msg>Remove _i parameter when web request<commit_after>riot = require \riot

spinner = null
api-stack = 0

net = riot.observable!

riot.mixin \net do
	net: net

module.exports = (i, endpoint, data) ->
	api-stack++

	if typeof i == \object then i = i._web

	web = (endpoint.index-of '://') > -1

	body = []

	for k, v of data
		if v != undefined
			v = encodeURIComponent v
			body.push "#k=#v"

	if i? and not web
		body.push "_i=#i"

	opts =
{'fraction_non_alphanumeric': 0.14779499404052443, 'fraction_numerical': 0.004767580452920143, 'mean_word_length': 2.7333333333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4014317', 'n_tokens_mistral': 356, 'n_tokens_neox': 321, 'n_words': 104}