- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
正如您即将看到的那样,我是网络编程的新手。
我正在尝试使用 Unfuddle 的 API 定期检索文件。我尝试了他们的第一个代码示例,它似乎从我的 HTTP GET
调用返回了有效信息,但我不知道如何使用此信息将特定文件放到我的硬盘上。这是怎么做到的?
这是我的确切 HTTP GET 调用和响应(除了被替换的密码):
bmihura@bmihura-PC ~
$ curl -i -u bmihra:password -X GET \
> -H 'Accept: application/xml' \
> 'http://spowertech.unfuddle.com/api/v1/projects/projects.xml'
HTTP/1.1 302 Found
Server: nginx/1.0.5
Date: Fri, 17 Aug 2012 11:53:23 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.8
Vary: Accept-Encoding
Cache-Control: no-cache
Set-Cookie: authenticated=; domain=.unfuddle.com; path=/; expires=Thu, 01-Jan-19 70 00:00:00 GMT
Set-Cookie: authenticated=false; path=/; expires=Fri, 17-Aug-2012 13:51:24 GMT
Set-Cookie: unfuddle_secure=; domain=.unfuddle.com; path=/; expires=Thu, 01-Jan- 1970 00:00:00 GMT
Set-Cookie: _unfuddle_session=; domain=.unfuddle.com; path=/; expires=Thu, 01-Ja n-1970 00:00:00 GMT
Set-Cookie: _unfuddle_session=BAh7BjoPc2Vzc2lvbl9pZCIlZGIzOTlmMTcxZGIwZjE4MDRhZW RkZGVmOGI4YjIxNzM%3D--0833ed386e5cd62894bb8dd787d856545897df35; path=/; expires= Fri, 17-Aug-2012 13:53:24 GMT; HttpOnly
Location: https://spowertech.unfuddle.com/projects/projects
Content-Length: 115
Status: 302
<html><body>You are being <a href="https://spowertech.unfuddle.com/projects/proj ects">redirected</a>.</body></html>
最佳答案
您需要在底部的 url 中使用 https 而不是 http - 即
curl -i -u bmihra:password -X GET \
-H 'Accept: application/xml' \
'https://spowertech.unfuddle.com/api/v1/projects/projects.xml'
此外,为了让它在我的 Windows 机器上运行,我必须将 -H 中的 ' 替换为 "并删除 url 周围的 '。所以我最终使用了
curl -i -u bmihra:password -X GET \
-H "Accept: application/xml" \
https://spowertech.unfuddle.com/api/v1/projects/projects.xml
希望对您有所帮助!
关于api - 如何使用 Unfuddle API 获取文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12005654/
我需要一个包含 SVN 托管的在线项目管理工具,因为我的开发团队都是远程的。我无意中发现了一个名为 Unfuddle 的网站,到目前为止已经阅读了不错的评论。我非常保护我的代码,并希望确保我的代码免受
正如您即将看到的那样,我是网络编程的新手。 我正在尝试使用 Unfuddle 的 API 定期检索文件。我尝试了他们的第一个代码示例,它似乎从我的 HTTP GET 调用返回了有效信息,但我不知道如何
我的团队使用 Github 进行代码托管,使用 Unfuddle 进行票务。是否可以将 Github 连接到 Unfuddle,以便我们能够从提交消息中更新/关闭票证? 最佳答案 正如 Markdor
我目前在 Unfuddle 上托管了几个 SVN 存储库,我希望将这些存储库的本地副本作为备份。理想情况下,这将是一个“实时”备份,因此我的本地存储库将“ping”远程存储库,如果检测到任何更改,这些
设置下划线会有什么变化? git config remote.unfuddle.push refs/heads/master:refs/heads/master 最佳答案 它将配置您当前的存储库(使用
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 11 年前。 Improve thi
我是一名优秀的程序员,十分优秀!