Pycurl PUT 请求到 JIRA REST API 等待 100 继续

Pycurl PUT request to JIRA REST API waiting on 100 continue

我正在尝试使用 pycurl 更改 JIRA 中的受让人。我的代码正在等待 ****HTTP/1.1 100 Continue****。我究竟做错了什么?谢谢你的帮助。我在下面附上了我的代码片段。 我也不想使用 JIRA Python 库。

def assign(self, key, name):

    data = json.dumps({"fields":{"assignee":{"name":name}}}) 
    c= pycurl.Curl()
    c.setopt(pycurl.VERBOSE, 1)
    c.setopt(pycurl.URL, "http://xxx/rest/api/2/issue/"+ key )
    c.setopt(pycurl.HTTPHEADER, ['Content-Type: application/json', 'Accept: application/json'])
    c.setopt(pycurl.USERPWD, "****") 
    c.setopt(pycurl.PUT, 1) 
    c.setopt(pycurl.POSTFIELDS,data)
    c.perform()

代码运行正常。

   def assign(self, key, name):
    self._startCurl()         
    self.c.setopt(pycurl.URL, "http://xxx/rest/api/2/issue/"+ key )
    self.c.setopt(pycurl.HTTPHEADER, ['Content-Type: application/json', 'Accept: application/json'])
    self.c.setopt(pycurl.USERPWD, "fred:fred") 
    self.c.setopt(pycurl.CUSTOMREQUEST, "PUT")
    data = json.dumps({"fields":{"assignee":{"name":name}}})
    self.c.setopt(pycurl.POSTFIELDS,data)        
    self.c.perform()
    self.c.close()