0

我想知道如何从 C# 复制这段代码(从我的朋友那里得到)。

FisHttp.HttpClientSocket fisclient = new HttpClientSocket();
fisReply = fisclient.postRequest(_fisGetUrl, context);

适用于 python 基础。

4

1 回答 1

0

你可以像这样在python中使用请求:

import urllib2
import json
        req = urllib2.Request("REQUEST_ADDRESS")
        req.add_header('Content-Type', 'application/json')
        try:
            response = urllib2.urlopen(req, json.dumps(model))
        except:
            print "Connection To Server Error!!!!!!!!......"
        else:
            text = response.read()

并且“模型”是数据的字典

于 2019-02-20T07:02:58.583 回答