Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace ManualTesting
- {
- using System.Collections.Generic;
- using System.IO;
- using System.Net;
- internal static class ManualTesting
- {
- private static void Main()
- {
- Dictionary<string, object> dictionary = new Dictionary<string, object>
- {
- {
- "fileKey1", new FileParameter(File.ReadAllBytes(@"C:\file1.jpg"), "file1.jpg", "image/jpeg")
- },
- {
- "fileKey2", new FileParameter(File.ReadAllBytes(@"C:\file2.jpg"), "file2.jpg", "image/jpeg")
- },
- {
- "fileKey3", new FileParameter(File.ReadAllBytes(@"C:\file3.jpg"), "file3.jpg", "image/jpeg")
- },
- {
- "stringKey", "stringValue"
- }
- };
- const string userAgent = "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36 OPR/20.0.1387.82";
- HttpWebResponse response = MultipartFormDataPost("http://example.com/post.aspx", userAgent, dictionary);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement