Post Request Works but Get Request doesn't

回答済み
新規投稿

コメント

3件のコメント

  • 正式なコメント
    Alex Novotny

    Hello, 

    Try changing Method.Get to Method.GET

    Thanks,

    Alex, Box Developer Advocate

    コメントアクション パーマリンク
  • Tyler Meneghini

    ended up giving up on the HTTP Request and used the SDK. Here is my code that works:

    BoxFolder folderWithLink = new BoxFolder(); BoxSharedLinkRequest linkRequest = new BoxSharedLinkRequest();

            int offset = 0;
            int count = 0;
            string folderID = "";
    
            //create connection to Box.com
            var boxConfig = new BoxConfigBuilder("CLIENT ID", "CLIENT SECRET", "Enterprise ID", "PRIVATE KEY", "PRIVATE KEY PASSWORD", "PUBLIC KEY ID").Build();
            var boxJWT = new BoxJWTAuth(boxConfig);
            var adminToken = await boxJWT.AdminTokenAsync();
            var client = boxJWT.AdminClient(adminToken);
    
    
            //Get the parent folder information and find the Batch folderID
            while (folderID == "")
            {
                var batches = await client.FoldersManager.GetFolderItemsAsync("FOLDER ID", 250, offset);
                foreach (var batchEntry in batches.Entries)
                {
                    Console.Writeline(Batch.Name);
                }
    0
    コメントアクション パーマリンク
  • Alex Novotny

    Ah! Yes. I was actually wondering why you weren't using the SDK... :) 

    0
    コメントアクション パーマリンク

投稿コメントは受け付けていません。