4.14Adding Stream content
Created on Aug 17, 2026~1 min read
Add Stream content to the multipart form content.
HttpRequestBuilder.Post("https://furion.net") .SetMultipartContent(multipart => { multipart.AddStream(stream, "file"); multipart.AddStream(stream, "file", "test.txt"); // Set the file name multipart.AddStream(stream, "file", "test.txt", "text/plain"); // Set the media type; if Content-Type is not provided, it will be automatically resolved based on the file extension multipart.AddStream(stream, "file", "test.txt", "text/plain", disposeResourcesOnRequestCompletion: true); // Can set resources to be automatically released after the request completes });