SonarQubeでプロジェクトを削除するための投稿要求を送信する単純なpython 3スクリプトがあります。私は私のpythonスクリプトを取得し続けている間、単純なカールコマンドが動作します...何か私のpythonスクリプトで間違っているアイデア?Python Post - レスポンスは400になりますが、カールは機能します
import requests
headers = {
'Authorization': 'Basic YWRtaW46YWRtaW4=',
}
files = [
('key', 'com.eclipseoptions.viewserver:viewserver:feature_VS-313-add-an-instruction-event-and-view'),
]
r = requests.post('http://devsonar/api/projects/delete', headers=headers, files=files)
print(r)
次curlコマンドが正常に動作します:
curl -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -F "key=com.eclipseoptions.viewserver:viewserver:feature_VS-313-add-an-instruction-event-and-view" "http://devsonar/api/projects/delete"