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. 用SpringMVC实现的上传下载方式二(多文件上传)

    参考来源:      http://blog.csdn.net/qq_32953079/article/details/52290208 1.导入相关jar包 commons-fileupload.j ...

  2. offset家族基本简介

    Offset家族简介 offset这个单词本身是--偏移,补偿,位移的意思. js中有一套方便的获取元素尺寸的办法就是offset家族: offsetWidth和offsetHight 以及offse ...

  3. 第四次团队作业——项目Alpha版本发布

    这个作业属于哪个课程  <课程的链接>         这个作业要求在哪里 <作业要求的链接> 团队名称 Three cobblers 这个作业的目标 发布项目α版本,对项目进 ...

  4. 转载pcb设计详细版

    http://www.51hei.com/bbs/dpj-52438-1.html 详细的altium designer制作PCB步骤,按照步骤一步步的学习就会自己制作PCB模型 目 录 实验三  层 ...

  5. SQL Server的安装笔记

    SQL安装笔记 安装SQL Server 2008 打开SQL Server 2008中的setup.exe,显示SQL安装程序的对话框. 提示必须安装相关组件Microsoft.NET Framew ...

  6. Farseer.net轻量级开源框架 入门篇:添加数据详解

    导航 目   录:Farseer.net轻量级开源框架 目录 上一篇:Farseer.net轻量级开源框架 入门篇: 分类逻辑层 下一篇:Farseer.net轻量级开源框架 入门篇: 修改数据详解 ...

  7. canvas一周一练 -- canvas绘制饼图(3)

    运行效果: <!DOCTYPE html> <html> <head> </head> <body> <canvas id=" ...

  8. AMH V4.5 – 基于AMH4.2的第三方开发版

    AMH V4.5[基于AMH4.2第三方开发版]重新部署了一次安装脚本,修改一系列BUG,已完美支持CENTOS7,树莓派,Fedora,Aliyun,Amazon,debian,Ubuntu,Ras ...

  9. MFC获取各类指针句柄

    最近有些人在问MFC编程一些要点,有一些句柄的获取.指针的获取是常见的问题,本文将对这些问题做以解释,参考了前人的笔录(见reference),希望能够帮助大家更方便地进行MFC程序开发. 一般我们使 ...

  10. 出现For input string: "" 错误

    然后是因为后台生成的是一个数组,前台取的是一个对象,所以会产生这个错误 前后台交互时 mv.addObject("vo1",fhList.get(0));}将数组改成fhList. ...