4.15Adding byte array content
Created on Aug 17, 2026~1 min read
Add byte array content to the multipart form content.
HttpRequestBuilder.Post("https://furion.net") .SetMultipartContent(multipart => { multipart.AddByteArray(bytes, "file"); multipart.AddByteArray(bytes, "file", "test.txt"); // Set the file name multipart.AddByteArray(bytes, "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 });