1. swift的存取用curl命令. 我们先把pub url 和token保存起来

root@A071103070098:~# export pubURL=http://10.194.148.102:8080/v2.0/AUTH_ed03db73438343848db63062d7fd9271
root@A071103070098:~# export mytoken=MIIGKwYJKoZIhvcNAQcCoIIGHDCCBhgCAQExCTAHBgUrDgMCGjCCBIEGCSqGSIb3DQEHAaCCBHIEggRueyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxNC0wOS0wNlQwNzoyOTowMS40NTk3NzEiLCAiZXhwaXJlcyI6ICIyMDE0LTA5LTA2VDA4OjI5OjAxWiIsICJpZCI6ICJwbGFjZWhvbGRlciIsICJ0ZW5hbnQiOiB7ImRlc2NyaXB0aW9uIjogIkRlZmF1bHQgVGVuYW50IiwgImVuYWJsZWQiOiB0cnVlLCAiaWQiOiAiZWQwM2RiNzM0MzgzNDM4NDhkYjYzMDYyZDdmZDkyNzEiLCAibmFtZSI6ICJhZG1pbiJ9fSwgInNlcnZpY2VDYXRhbG9nIjogW3siZW5kcG9pbnRzIjogW3siYWRtaW5VUkwiOiAiaHR0cDovLzEwLjE5NC4xNDguMTAyOjgwODAvdjEiLCAicmVnaW9uIjogIlJlZ2lvbk9uZSIsICJpbnRlcm5hbFVSTCI6ICJodHRwOi8vMTAuMTk0LjE0OC4xMDI6ODA4MC92MS9BVVRIX2VkMDNkYjczNDM4MzQzODQ4ZGI2MzA2MmQ3ZmQ5MjcxIiwgImlkIjogIjRkNGFhZWViYmNmNzQxNDI4YjAwN2Q0ZTFlZmJhZTgwIiwgInB1YmxpY1VSTCI6ICJodHRwOi8vMTAuMTk0LjE0OC4xMDI6ODA4MC92MS9BVVRIX2VkMDNkYjczNDM4MzQzODQ4ZGI2MzA2MmQ3ZmQ5MjcxIn1dLCAiZW5kcG9pbnRzX2xpbmtzIjogW10sICJ0eXBlIjogIm9iamVjdC1zdG9yZSIsICJuYW1lIjogInN3aWZ0In0sIHsiZW5kcG9pbnRzIjogW3siYWRtaW5VUkwiOiA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vEsRE7ezx0AJ1xqvuDs7A3a0npXwi+G8+A85ycVvyjEvJfMb15yxtnA4E6v2y-xqNH94MKDc9wEEbxsyg3f0OI3e3vzKAQ1vQ=

2. swift 获得验证信息

root@A071103070098:~# export pubURL=http://10.194.148.102:8080/v2.0/AUTH_ed03db73438343848db63062d7fd9271
root@A071103070098:~# export mytoken=MIIGKwYJKoZIhvcNAQcCoIIGHDCCBhgCAQExCTAHBgUrDgMCGjCCBIEGCSqGSIb3DQEHAaCCBHIEggRueyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxNC0wOS0wNlQwNzoyOTowMS40NTk3NzEiLCAiZXhwaXJlcyI6ICIyMDE0LTA5LTA2VDA4OjI5OjAxWiIsICJpZCI6ICJwbGFjZWhvbGRlciIsICJ0ZW5hbnQiOiB7ImRlc2NyaXB0aW9uIjogIkRlZmF1bHQgVGVuYW50IiwgImVuYWJsZWQiOiB0cnVlLCAiaWQiOiAiZWQwM2RiNzM0MzgzNDM4NDhkYjYzMDYyZDdmZDkyNzEiLCAibmFtZSI6ICJhZG1pbiJ9fSwgInNlcnZpY2VDYXRhbG9nIjogW3siZW5kcG9pbnRzIjogW3siYWRtaW5VUkwiOiAiaHR0cDovLzEwLjE5NC4xNDguMTAyOjgwODAvdjEiLCAicmVnaW9uIjogIlJlZ2lvbk9uZSIsICJpbnRlcm5hbFVSTCI6ICJodHRwOi8vMTAuMTk0LjE0OC4xMDI6ODA4MC92MS9BVVRIX2VkMDNkYjczNDM4MzQzODQ4ZGI2MzA2MmQ3ZmQ5MjcxIiwgImlkIjogIjRkNGFhZWViYmNmNzQxNDI4YjAwN2Q0ZTFlZmJhZTgwIiwgInB1YmxpY1VSTCI6ICJodHRwOi8vMTAuMTk0LjE0OC4xMDI6ODA4MC92MS9BVVRIX2VkMDNkYjczNDM4MzQzODQ4ZGI2MzA2MmQ3ZmQ5MjcxIn1dLCAiZW5kcG9pbnRzX2xpbmtzIjogW10sICJ0eXB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3ypoUm8yL0NpQa-Mk2NJSlShKIaNnzMMHLJTaSX5nXCJf8QXUE1yHUswn0gyYal0MEn-vNtTjN14jidA5t9AJvEsRE7ezx0AJ1xqvuDs7A3a0npXwi+G8+A85ycVvyjEvJfMb15yxtnA4E6v2y-xqNH94MKDc9wEEbxsyg3f0OI3e3vzKAQ1vQ=

3. swift获取一个account的信息

root@A071103070098:~# curl -i $pubURL?format=xml X GET -H "X-Auth-Token:$mytoken"
HTTP/1.0 OK
Content-Type: application/xml; charset=utf-
X-Account-Object-Count:
X-Timestamp: 1409991063.88358
X-Account-Bytes-Used:
X-Account-Container-Count:
X-Put-Timestamp: 1409991063.88358
X-Trans-Id: tx2c2521cc353e4d5d9d12f-00540ac197
Date: Sat, Sep :: GMT
Content-Length:
X-Cache: MISS from NS-M46903639710
X-Cache-Lookup: MISS from NS-M46903639710:
Connection: close <?xml version="1.0" encoding="UTF-8"?>
<account name="AUTH_ed03db73438343848db63062d7fd9271">
</account>HTTP/1.0 Service Unavailable
Date: Sat, Sep :: GMT
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=utf-
Content-Length:
X-Cache: MISS from NS-M46903639710
X-Cache-Lookup: MISS from NS-M46903639710:
Connection: close <HTML><HEAD>
<TITLE>Network Error</TITLE>
</HEAD>
<BODY>
<FONT face="Helvetica">
<big><strong></strong></big><BR>
</FONT>
<blockquote>
<TABLE border= cellPadding= width="80%">
<TR><TD>
<FONT face="Helvetica">
<big>Network Error (dns_server_failure)</big>
<BR>
<BR>
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
Your request could not be processed because an error occurred contacting the DNS server.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
The DNS server may be temporarily unavailable, or there could be a network problem.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica" SIZE=>
<BR> </FONT>
</TD></TR>
</TABLE>
</blockquote>
</FONT>
</BODY></HTML>
HTTP/1.0 Moved Temporarily
Date: Sat, Sep :: GMT
Server: BlueCoat-Security-Appliance/1.1.
Location: http://www.get.com/
Content-Length:
X-Cache: MISS from NS-M46903639710
X-Cache-Lookup: MISS from NS-M46903639710:
Connection: close <HTML>
<HEAD><TITLE>Redirection</TITLE></HEAD>
<BODY><H1>Redirect</H1></BODY>
</HTML>
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~#
root@A071103070098:~# curl -i $pubURL?format=xml X GET -H "X-Auth-Token:$mytoken"
HTTP/1.0 OK
Content-Type: application/xml; charset=utf-
X-Account-Object-Count:
X-Timestamp: 1409991214.82764
X-Account-Bytes-Used:
X-Account-Container-Count:
X-Put-Timestamp: 1409991214.82764
X-Trans-Id: tx7b3eaa212b0b44d9a899d-00540ac22e
Date: Sat, Sep :: GMT
Content-Length:
X-Cache: MISS from NS-M46903639710
X-Cache-Lookup: MISS from NS-M46903639710:
Connection: close <?xml version="1.0" encoding="UTF-8"?>
<account name="AUTH_ed03db73438343848db63062d7fd9271">
</account>HTTP/1.0 Service Unavailable
Date: Sat, Sep :: GMT
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=utf-
Content-Length:
X-Cache: MISS from NS-M46903639710
X-Cache-Lookup: MISS from NS-M46903639710:
Connection: close <HTML><HEAD>
<TITLE>Network Error</TITLE>
</HEAD>
<BODY>
<FONT face="Helvetica">
<big><strong></strong></big><BR>
</FONT>
<blockquote>
<TABLE border= cellPadding= width="80%">
<TR><TD>
<FONT face="Helvetica">
<big>Network Error (dns_server_failure)</big>
<BR>
<BR>
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
Your request could not be processed because an error occurred contacting the DNS server.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
The DNS server may be temporarily unavailable, or there could be a network problem.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica" SIZE=>
<BR> </FONT>
</TD></TR>
</TABLE>
</blockquote>
</FONT>
</BODY></HTML>
HTTP/1.0 Moved Temporarily
Date: Sat, Sep :: GMT
Server: BlueCoat-Security-Appliance/1.1.
Location: http://www.get.com/
Content-Length:
X-Cache: MISS from NS-M46903639710
X-Cache-Lookup: MISS from NS-M46903639710:
Connection: close <HTML>
<HEAD><TITLE>Redirection</TITLE></HEAD>
<BODY><H1>Redirect</H1></BODY>
</HTML>

python_swift_project_swift使用的更多相关文章

随机推荐

  1. C# 相关概念

    解决方案 在磁盘上由 .sln 文件表示,是一个或多个相关项目的容器. 例如,如果为 Python 应用程序编写 C++ 扩展,该 C++ 项目可以驻留在同一解决方案中. 解决方案还可以包含 Web ...

  2. 全面学习ORACLE Scheduler特性(7)Scheduler抛出的Events

    四.使用Events Event直译对应的中文解释是指事件,不过单纯讲事件毕竟太抽象了,举个示例来形容吧.A(对应某个应用程序,或者是ORACLE中的进程)在干活时突然眉头一皱说道,不好,前方有情况, ...

  3. c++类的内存布局

    问题: 考察了reinterpret_cast和static_cast的区别.顺道发现了一个可以查看c++内存布局的工具(在VS中). 结果: 前两个输出的地址形同,后一个不同. class A{in ...

  4. 记一次java应用cpu利用率过高调试经历

    1,现象 写的一个storm应用,主要是通过mysql的binlog来同步表到hbase.运行一段时间后发现,经常会出现cpu使用率飙升到200%以上,然后各种消息堆积报警等等出现各种问题 2,调研过 ...

  5. 从实际案例聊聊Java应用的GC优化--转

    https://tech.meituan.com/jvm_optimize.html 当Java程序性能达不到既定目标,且其他优化手段都已经穷尽时,通常需要调整垃圾回收器来进一步提高性能,称为GC优化 ...

  6. servlet下的request&&response

    request的方法     *获取请求方式: request.getMethod();     * 获取ip地址的方法 request.getRemoteAddr();     * 获得用户清气的路 ...

  7. tp登陆注册(转)

    登录时,更新用户数据,登录ip和登录时间,以及登录次数+1,此实现方便不知是否合适,待验证.源码地址:https://github.com/grh0812/thinkphp-login-registe ...

  8. ThinkPHP系统流程

    1.用户通过入口文件访问控制器2.控制器从模型层中提取数据3.控制器将数据返回模板页面

  9. Slow HTTP Denial of Service Attack 漏洞解决办法

    编辑 删除 问题名称: Slow HTTP Denial of Service Attack 问题URL http://10.238.*.*:58*** 风险等级: 高 问题类型: 服务器配置类 漏洞 ...

  10. JS模拟CSS3动画-贝塞尔曲线

    一.什么是贝塞尔曲线 1962年,法国工程师皮埃尔·贝塞尔(Pierre Bézier),贝塞尔曲线来为为解决汽车的主体的设计问题而发明了贝塞尔曲线.如今,贝赛尔曲线是计算机图形学中相当重要的一种曲线 ...