locked
Creating folders issue!! RRS feed

  • Question

  • I have read about creating folder here (http://msdn.microsoft.com/en-us/live/hh561740.aspx#creating_folders), here is my code:

                WebRequest request = WebRequest.Create("https://apis.live.net/v5.0/folder.77e1a950546be643.77E1A950546BE643!202/files/");
                request.Method = "POST";
                string postData = "{name: \"My example folder\"}";
                byte[] byteArray = Encoding.UTF8.GetBytes(postData);
                request.Headers.Add("Authorization", "Bearer " + access_token);
                request.ContentType = "application/json";
                request.ContentLength = byteArray.Length;

    And not sure whay I get a 400 returned:

    { "error": { "code": "request_header_invalid", "message": "The provided header 'Content-Type' is missing a required parameter 'boundary'." } }

    What I am doing wrong?

    Thanks for your time!


    http://thi.vn



    • Edited by nvcnvn Thursday, March 15, 2012 3:02 PM
    Thursday, March 15, 2012 2:48 PM

Answers

All replies