<commit_before>﻿using System;
using System.Text;

using B2.Client.Rest.Request;
using B2.Client.Rest.Request.Param;


namespace B2.Client.Apis.AuthorizeAccountV1
{
    /// <summary>
    /// Request object for the 'b2_authorize_account' version 1 API.
    /// </summary>
    public sealed class AuthorizeAccountV1Request : MultipartPostRestRequest
    {
        /// <summary>
        /// Create a new authorization request.
        /// </summary>
        /// <param name="authorization">The authorization header value to use.</param>
        /// <param name="accountId">The identifier of the B2 account.</param>
        /// <param name="accountKey">The application key to use for the specified account.</param>
        public AuthorizeAccountV1Request(string accountId, string accountKey)
            : base(UrlParams.Empty,
                   new HeaderParams(
                       RequiredParam.Of("Authorization",
                           "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(accountId + ":" + accountKey)))
                   ),
                   BodyParams.Empty,
                   DataParams.Empty) { }
    }
}<commit_msg>make b2_authorize_account API use JSON-encoded request<commit_after>﻿using System;
using System.Text;

using B2.Client.Rest.Request;
using B2.Client.Rest.Request.Param;


namespace B2.Client.Apis.AuthorizeAccountV1
{
    /// <summary>
    /// Request object for the 'b2_authorize_account' version 1 API.
    /// </summary>
    public sealed class AuthorizeAccountV1Request : JsonPostRestRequest
    {
        /// <summary>
        /// Create a new authorization request.
        /// </summary>
        /// <param name="accountId">The identifier of the B2 account.</param>
        /// <param name="accountKey">The application key to use for the specified account.</param>
        public AuthorizeAccountV1Request(string accountId, string accountKey)
            : base(UrlParams.Empty,
                   new HeaderParams(
                       RequiredParam.Of("Authorization",
                           "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(accountId + ":" + accountKey)))
                   ),
                   BodyParams.Empty) { }
    }
}
{'fraction_non_alphanumeric': 0.11045987376014428, 'fraction_numerical': 0.01127141568981064, 'mean_word_length': 2.1654778887303854, 'pattern_counts': {'":': 2, '<': 21, '<?xml version=': 0, '>': 21, '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': '5566366', 'n_tokens_mistral': 591, 'n_tokens_neox': 573, 'n_words': 137}