0
Dim url As String = String.Format("{0}folders/{1}", boxApiUrl, ParentFolderId) 'ParentFolderId being pass is "0"
Using request = New HttpRequestMessage() With {.RequestUri = New Uri(url), .Method = HttpMethod.Post}
request.Headers.Authorization = New System.Net.Http.Headers.AuthenticationHeaderValue("Authorization", "Bearer " + acctoken)
Dim data As Dictionary(Of [String], [String]) = New Dictionary(Of String, String)()
data.Add("name", FolderName)
Dim content As HttpContent = New FormUrlEncodedContent(data)
request.Content = content
Dim response = _httpClient.SendAsync(request).Result
If response.IsSuccessStatusCode Then
'
End If
End Using
我懷疑數據沒有正確放在一起,但無法弄清楚如何傳遞文件夾名稱以在根目錄下創建。所有其他功能(讀取根文件夾,上傳文件等)使用令牌工作正常。Box.Net創建文件夾錯誤請求400