在Python中,以下代码的等效性是什么? 更具体地说,在Python中寻找HttpEntity的等价物。剩下的我都弄明白了。我正在使用urllib2python模块。你知道吗
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();
它似乎类似于urllib2。请求: https://docs.python.org/2/library/urllib2.html#urllib2.Request
相关问题 更多 >
编程相关推荐