<commit_before>package browser.net;
#if js


import browser.events.Event;
import browser.events.EventDispatcher;
import browser.events.HTTPStatusEvent;
import browser.events.IOErrorEvent;
import browser.events.ProgressEvent;
import browser.errors.IOError;
import browser.utils.ByteArray;
import browser.Html5Dom;
import js.Lib;


class URLLoader extends EventDispatcher {
	
	
	public var bytesLoaded:Int;
	public var bytesTotal:Int;
	public var data:Dynamic;
	public var dataFormat:URLLoaderDataFormat;
	
	
	public function new(request:URLRequest = null) {
		
		super();
		
		bytesLoaded = 0;
		bytesTotal = 0;
		dataFormat = URLLoaderDataFormat.TEXT;
		
		if (request != null) {
			
			load(request);
			
		}
		
	}
	
	
	public function close():Void {
		
		
		
	}
	
	
	private dynamic function getData():Dynamic {
		
		return null;
		
	}
	
	
	public function load(request:URLRequest):Void {
		
		switch (dataFormat) {
			
			case BINARY:
				
				request.requestHeaders.push(new URLRequestHeader("Content-Type", "application/octet-stream"));
			
			default:
				
				if (request.method != "GET") {
					
					request.requestHeaders.push(new URLRequestHeader("Content-Type", "application/x-www-form-urlencoded"));<commit_msg>allow override default Content-Type in URLLoader<commit_after>package browser.net;
#if js


import browser.events.Event;
import browser.events.EventDispatcher;
import browser.events.HTTPStatusEvent;
import browser.events.IOErrorEvent;
import browser.events.ProgressEvent;
import browser.errors.IOError;
import browser.utils.ByteArray;
import browser.Html5Dom;
import js.Lib;


class URLLoader extends EventDispatcher {
	
	
	public var bytesLoaded:Int;
	public var bytesTotal:Int;
	public var data:Dynamic;
	public var dataFormat:URLLoaderDataFormat;
	
	
	public function new(request:URLRequest = null) {
		
		super();
		
		bytesLoaded = 0;
		bytesTotal = 0;
		dataFormat = URLLoaderDataFormat.TEXT;
		
		if (request != null) {
			
			load(request);
			
		}
		
	}
	
	
	public function close():Void {
		
		
		
	}
	
	
	private dynamic function getData():Dynamic {
		
		return null;
		
	}
	
	
	public function load(request:URLRequest):Void {
		
		switch (dataFormat) {
			
			case BINARY:
				
				request.requestHeaders.unshift(new URLRequestHeader("Content-Type", "application/octet-stream"));
			
			default:
				
				if (request.method != "GET") {
					
					request.requestHeaders.unshift(new URLRequestHeader("Content-Type", "application/x-www-form-urlencoded"));
{'fraction_non_alphanumeric': 0.10164724789071916, 'fraction_numerical': 0.0024106066693451184, 'mean_word_length': 3.689265536723164, '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': '2609086', 'n_tokens_mistral': 909, 'n_tokens_neox': 736, 'n_words': 162}