Skip to content

Commit 448f6d1

Browse files
normal-wlshanshuaikang
authored andcommitted
minor: review fix
1 parent 858754b commit 448f6d1

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

bk-plugin-framework/bk_plugin_framework/runtime/callbacker.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ def _check_response_with_result(json_response: dict):
2323
def callback(self, *args, **kwargs):
2424
try:
2525
logger.info(f"[plugin callback]: url={self.callback_url}, data={self.callback_data}")
26-
response = requests.post(url=self.callback_url, data=json.dumps(self.callback_data), verify=False)
26+
response = requests.post(
27+
url=self.callback_url,
28+
data=json.dumps(self.callback_data),
29+
headers={"Content-Type": "application/json"},
30+
verify=False,
31+
)
2732
response.raise_for_status()
2833
if self._check_response_with_result(response.json()) is False:
2934
raise HTTPError(f"[plugin callback] response with result False: {response.json()}")

0 commit comments

Comments
 (0)