Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Redmine redmine = new Redmine();
- RestClient client = new RestClient("http://localhost/redmine/");
- client.Authenticator = new HttpBasicAuthenticator("myuser", "mypsw");
- var request2 = new RestRequest("uploads.json", Method.POST);
- request2.AddHeader("Content-Type", "application/octet-stream");
- request2.RequestFormat = RestSharp.DataFormat.Json;
- byte[] dataToSend = File.ReadAllBytes(AddIssue.attach.Text);
- request2.AddBody(dataToSend);
- IRestResponse response2 = client.Execute(request2);
- resultbox.Text = response2.Content;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement