Click here to Skip to main content
15,042,814 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm tying to upload photo to Tumblr via RestSharp. Here are my code.

var restClient = new RestClient("");
  var request = new RestRequest(Method.POST);

  request.RequestFormat = DataFormat.Json;

  request.AddParameter("email", "");
  request.AddParameter("password", "acb");
  request.AddParameter("type", "photo");
  request.AddParameter("caption", "testing");
  request.AddFile("data", "C:\\photo\\photo1.jpg");

  IRestResponse response = restClient.Execute(request);

Nothing happen after the code been executed. Is there anything wrong with my code? Thanks in advance.

p.s : Is oauth needed?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900