WinRT / Metro App Windows 8上的Echonest API [英] Echonest API on WinRT/Metro App Windows 8
问题描述
各位大家好!
我正在尝试在Metro APP上进行Echonest API调用。 Echonest API( http://developer.echonest.com/docs/v4/track .html #upload )需要我使用multipart / form-data请求
进行交互。
使用Curl进行API测试,调用应该是如下:
curl - F " api_key = N6E4NIOVYMTHNDM8J" - F " filetype = mp3" - F " track=@audio.mp3" " http://developer.echonest.com/api/v4/track/上传"
OR
curl - X POST - H " Content-Type:application / octet-stream" " http://developer.echonest.com/api/v4/track/upload?api_key = N6E4NIOVYMTHNDM8J& filetype = mp3" - 数据 - 二进制" @ audio.mp3"
嗨Gutemberg,
您找到的HttpClient上传示例就是我们所拥有的。你能解释一下你改变了什么以及你遇到了什么问题吗?我们可以尝试帮助Windows方面,但如果您需要专门针对其平台的示例
代码,您可能需要与Echonest开发人员交谈。
看一下Piyush的WCF博客(链接在
this sticky "。
- Rob
Hello everybody!
I'm trying to make Echonest API calls on a Metro APP. The Echonest API(http://developer.echonest.com/docs/v4/track.html#upload) needs me to use a multipart/form-data request to interact with.
Using Curl to make API tests, the calls should be as follow:
curl -F "api_key=N6E4NIOVYMTHNDM8J" -F "filetype=mp3" -F "track=@audio.mp3" "http://developer.echonest.com/api/v4/track/upload" OR curl -X POST -H "Content-Type:application/octet-stream" "http://developer.echonest.com/api/v4/track/upload?api_key=N6E4NIOVYMTHNDM8J&filetype=mp3" --data-binary "@audio.mp3"
Hi Gutemberg,
The HttpClient Upload sample you found is what we have for that. Can you explain what you changed and what problems you had? We can try to help with the Windows side of the equation, but you may need to talk to the Echonest developers if you need sample code specifically for their platform.
Also take a look at Piyush's WCF blog (linked in this sticky on the top of the forum) for more information about connecting to web services from Metro style apps.
--Rob
这篇关于WinRT / Metro App Windows 8上的Echonest API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!