flygithub 189007e44d
Fix: PUT method does not work as expected with Invoke component (#5081)
### What problem does this PR solve?
Invoke component can be used to call third party services.
Tried GET/POST/PUT from web UI, and found PUT request failed like this:
(test api: api/v1/chats/<assistant_id>)
 ```
{"code":100,"data":null,"message":"AttributeError("'NoneType' object has
no attribute 'get'")"}
```

Root cause: Invoke PUT with a 'data=args' parameter, which is a form-encoded data, however the default content type setting of request header is application/json. The test api could not deal with such case.

Fix: use the 'json' parameter of reqeusts.put(), same as Invoke POST. Do not use the 'data' parameter.
Another way is to use 'data=json.dumps(args)'.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-02-18 19:34:22 +08:00
..
2025-01-21 20:52:28 +08:00
2025-02-05 12:04:11 +08:00
2024-12-30 18:38:51 +08:00
2024-12-27 11:38:33 +08:00
2024-12-11 19:23:59 +08:00
2025-01-13 18:19:01 +08:00
2024-12-08 14:21:12 +08:00
2024-12-04 11:21:17 +08:00
2024-12-27 11:38:33 +08:00
2025-01-13 18:19:01 +08:00
2024-08-02 18:51:14 +08:00
2024-09-04 17:53:11 +08:00
2025-01-09 17:07:21 +08:00
2024-12-08 14:21:12 +08:00
2025-01-13 18:19:01 +08:00
2025-01-13 18:19:01 +08:00
2025-01-13 18:19:01 +08:00