Python中以下代码的等价物是什么?

时间:2015-03-31 15:58:32

标签: python urllib2

Python中以下代码的等价物是什么? 更具体地说,在Python中寻找HivpEntity的等价物。其余的我想通了。我正在使用urllib2 python模块。

String checkInUrl = serverURL+"resources/slmservices/fcs/commit"; 
URIBuilder checkInBuilder = new URIBuilder(checkInUrl.replace(" ", "%20"));
URI checkInUri = checkInBuilder.build();

checkinTicket = "sdfsfsdfsfsfweafdaewfw"        
HttpEntity checkInReqEntitiy = new StringEntity(checkinTicket);
HttpRequestBasecheckInRequest=reMethod.getRequest(checkInUri,checkInReqEntitiy);

checkInRequest.addHeader("ticket", ticket);

HttpResponse checkInResponse = httpclient.execute(checkInRequest);

HttpEntity checkInResponseEntity = checkInResponse.getEntity();

StatusLine checkInResponseStatus = checkInResponse.getStatusLine();

1 个答案:

答案 0 :(得分:0)