<commit_before>﻿using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Flurl.Http.Content;

namespace Flurl.Http
{
	/// <summary>
	/// MultipartExtensions
	/// </summary>
	public static class MultipartExtensions
	{
		/// <summary>
		/// Sends an asynchronous POST request.
		/// </summary>
		/// <param name="data">Contents of the request body.</param>
		/// <param name="client">The Flurl client.</param>
		/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
		/// <returns>A Task whose result is the received HttpResponseMessage.</returns>
		public static Task<HttpResponseMessage> PostMultipartAsync(this FlurlClient client, object data, CancellationToken cancellationToken) {
			var content = new CapturedMultipartContent(data);
			return client.SendAsync(HttpMethod.Post, content: content, cancellationToken: cancellationToken);
		}

		/// <summary>
		/// Sends an asynchronous POST request.
		/// </summary>
		/// <param name="data">Contents of the request body.</param>
		/// <param name="client">The Flurl client.</param>
		/// <returns>A Task whose result is the received HttpResponseMessage.</returns>
		public static Task<HttpResponseMessage> PostMultipartAsync(this FlurlClient client, object data) {
			return client.PostMultipartAsync(data, CancellationToken.None);
		}

		/// <summary>
		/// Creates a FlurlClient from the URL and sends an asynchronous POST request.
		/// </summary>
		/// <param name="data">Contents of the request body.</param>
		/// <param name="url">The URL.</param>
		/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
		/// <returns>A Task whose result is the received HttpResponseMessage.</returns>
		public static Task<HttpResponseMessage> PostMultipartAsync(this Url url, object data, CancellationToken cancellationToken) {
			return new FlurlClient(url, false).PostMultipartAsync(data, cancellationToken);
		}

		/// <summary>
		/// Creates a FlurlClient from the URL and sends an asynchronous POST request.
		/// </summary>
		/// <param name="data">Contents of the request body.</param>
		/// <param name="url">The URL.</param>
		/// <returns>A Task whose result is the received HttpResponseMessage.</returns>
		public static Task<HttpResponseMessage> PostMultipartAsync(this Url url, object data) {
			return new FlurlClient(url, false).PostMultipartAsync(data);
		}

		/// <summary>
		/// Creates a FlurlClient from the URL and sends an asynchronous POST request.
		/// </summary>
		/// <param name="data">Contents of the request body.</param>
		/// <param name="url">The URL.</param>
		/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
		/// <returns>A Task whose result is the received HttpResponseMessage.</returns>
		public static Task<HttpResponseMessage> PostMultipartAsync(this string url, object data, CancellationToken cancellationToken) {
			return new FlurlClient(url, false).PostMultipartAsync(data, cancellationToken);
		}

		/// <summary>
		/// Creates a FlurlClient from the URL and sends an asynchronous POST request.
		/// </summary>
		/// <param name="data">Contents of the request body.</param>
		/// <param name="url">The URL.</param>
		/// <returns>A Task whose result is the received HttpResponseMessage.</returns>
		public static Task<HttpResponseMessage> PostMultipartAsync(this string url, object data) {
			return new FlurlClient(url, false).PostMultipartAsync(data);
		}
	}
}<commit_msg>a few doc improvements<commit_after>﻿using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Flurl.Http.Content;

namespace Flurl.Http
{
	/// <summary>
	/// MultipartExtensions
	/// </summary>
	public static class MultipartExtensions
	{
		/// <summary>
		/// Sends an asynchronous multipart/form-data POST request.
		/// </summary>
		/// <param name="data">Contents of the request body.</param>
		/// <param name="client">The Flurl client.</param>
		/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
		/// <returns>A Task whose result is the received HttpResponseMessage.</returns>
		public static Task<HttpResponseMessage> PostMultipartAsync(this FlurlClient client, object data, CancellationToken cancellationToken) {
			var content = new CapturedMultipartContent(data);
			return client.SendAsync(HttpMethod.Post, content: content, cancellationToken: cancellationToken);
		}

		/// <summary>
		/// Sends an asynchronous multipart/form-data POST request.
		/// </summary>
		/// <param name="data">Contents of the request body.</param>
		/// <param name="client">The Flurl client.</param>
		/// <returns>A Task whose result is the received HttpResponseMessage.</returns>
		public static Task<HttpResponseMessage> PostMultipartAsync(this FlurlClient client, object data) {
			return client.PostMultipartAsync(data, CancellationToken.None);
		}

		/// <summary>
		/// Creates a FlurlClient from the URL and sends an asynchronous multipart/form-data POST request.
		/// </summary>
		/// <param name="data">Contents of the request body.</param>
		/// <param name="url">The URL.</param>
		/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
		/// <returns>A Task whose result is the received HttpResponseMessage.</returns>
		public static Task<HttpResponseMessage> PostMultipartAsync(this Url url, object data, CancellationToken cancellationToken) {
			return new FlurlClient(url, false).PostMultipartAsync(data, cancellationToken);
		}

		/// <summary>
		/// Creates a FlurlClient from the URL and sends an asynchronous multipart/form-data POST request.
		/// </summary>
		/// <param name="data">Contents of the request body.</param>
		/// <param name="url">The URL.</param>
		/// <returns>A Task whose result is the received HttpResponseMessage.</returns>
		public static Task<HttpResponseMessage> PostMultipartAsync(this Url url, object data) {
			return new FlurlClient(url, false).PostMultipartAsync(data);
		}

		/// <summary>
		/// Creates a FlurlClient from the URL and sends an asynchronous multipart/form-data POST request.
		/// </summary>
		/// <param name="data">Contents of the request body.</param>
		/// <param name="url">The URL.</param>
		/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
		/// <returns>A Task whose result is the received HttpResponseMessage.</returns>
		public static Task<HttpResponseMessage> PostMultipartAsync(this string url, object data, CancellationToken cancellationToken) {
			return new FlurlClient(url, false).PostMultipartAsync(data, cancellationToken);
		}

		/// <summary>
		/// Creates a FlurlClient from the URL and sends an asynchronous multipart/form-data POST request.
		/// </summary>
		/// <param name="data">Contents of the request body.</param>
		/// <param name="url">The URL.</param>
		/// <returns>A Task whose result is the received HttpResponseMessage.</returns>
		public static Task<HttpResponseMessage> PostMultipartAsync(this string url, object data) {
			return new FlurlClient(url, false).PostMultipartAsync(data);
		}
	}
}
{'fraction_non_alphanumeric': 0.12267309495111825, 'fraction_numerical': 0.0, 'mean_word_length': 4.108071135430917, 'pattern_counts': {'":': 0, '<': 127, '<?xml version=': 0, '>': 127, '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': '2357586', 'n_tokens_mistral': 2122, 'n_tokens_neox': 1976, 'n_words': 669}