<commit_before>angular.module( 'gj.Api' ).service( 'Api', function( $window, $http, $injector, Environment, Payload )
{
	var _this = this;

	this.apiHost = Environment.apiHost;
	this.apiPath = '/site-api';

	this.sendRequest = function( uri, postData, options )
	{
		options = $window._.defaults( options || {}, {

			// Files to upload can be passed in through here.
			file: null,

			// Whether or not to ignore the loading bar.
			ignoreLoadingBar: false,

			// Whether or not to process the payload at the end.
			processPayload: true,

			// Whether or not to send in the credentials.
			withCredentials: true,

			// Will filter out functions, sub-objects and sub-arrays from sending to the server.
			sanitizeComplexData: true,

			// A detached request tries to be outside of the system so it doesn't affect normal usage.
			// A shorthand for many options.
			// - ignores loading bar
			// - will ignore the user from the payload
			// - will ignore the version number so it doesn't refresh
			// - won't direct to an error page if there was a status code error
			detach: false,
		} );

		// Set up the detachment options if detach is set.
		if ( options.detach ) {
			options.ignoreLoadingBar = true;<commit_msg>Documenting allowComplexData field for Api.sendRequest().<commit_after>angular.module( 'gj.Api' ).service( 'Api', function( $window, $http, $injector, Environment, Payload )
{
	var _this = this;

	this.apiHost = Environment.apiHost;
	this.apiPath = '/site-api';

	this.sendRequest = function( uri, postData, options )
	{
		options = $window._.defaults( options || {}, {

			// Files to upload can be passed in through here.
			file: null,

			// Whether or not to ignore the loading bar.
			ignoreLoadingBar: false,

			// Whether or not to process the payload at the end.
			processPayload: true,

			// Whether or not to send in the credentials.
			withCredentials: true,

			// Will filter out functions, sub-objects and sub-arrays from sending to the server.
			sanitizeComplexData: true,

			// This should be an array of fields that you don't want to sanitize/filter in the POST data.
			// Use it as a whitelist of fields to pass through.
			allowComplexData: [],

			// A detached request tries to be outside of the system so it doesn't affect normal usage.
			// A shorthand for many options.
			// - ignores loading bar
			// - will ignore the user from the payload
			// - will ignore the version number so it doesn't refresh
			// - won't direct to an error page if there was a status code error
			detach: false,
		} );

		// Set up the detachment options if detach is set.
		if ( options.detach ) {
			options.ignoreLoadingBar = true;
{'fraction_non_alphanumeric': 0.09498878085265519, 'fraction_numerical': 0.0, 'mean_word_length': 2.962962962962963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6019732', 'n_tokens_mistral': 869, 'n_tokens_neox': 746, 'n_words': 331}