我正在编写自动交易机器人,使用python和sudsoap客户端。在
我想知道是否可以通过使用持久的SOAP调用来提高速度(比如在RESTful服务中使用Session)。在
我的请求如下:
DEBUG:suds.client:sending to (http://api.betdaq.com/v2.0/ReadOnlyService.asmx)
message:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://www.GlobalBettingExchange.com/ExternalAPI/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:None="http://www.GlobalBettingExchange.com/ExternalAPI/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<ns0:ExternalApiHeader xmlns="http://www.GlobalBettingExchange.com/ExternalAPI/" version="2" languageCode="en" username="****" password="****" applicationIdentifier="***"/>
</SOAP-ENV:Header>
<ns1:Body>
<ns0:GetPrices>
<getPricesRequest xmlns="http://www.GlobalBettingExchange.com/ExternalAPI/" NumberForPricesRequired="1" NumberAgainstPricesRequired="1">
<MarketIds>9430420</MarketIds>
</getPricesRequest>
</ns0:GetPrices>
</ns1:Body>
</SOAP-ENV:Envelope>
我得到的回答是:
^{pr2}$如您所见,在每个xml请求中,我都使用头作为用户名和密码。但当我得到回复的时候,邮件头上没有饼干。在
我想知道是否可以在我的请求中插入cookies或类似的东西来实现持久性。(就像在RESTful服务中使用Session)
不,你要听命于服务器响应-我知道它不会返回任何cookies。在
存在加速HTTP基本身份验证的拐角情况,允许抢先发送凭据,但不适用。在
确保重新使用HTTPS连接。在
相关问题 更多 >
编程相关推荐