You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending a request with Content-Type text/plain;charset=UTF-8, the tool incorrectly attempts to parse the response as JSON and throws an error: "Unexpected token '测', '测试' is not valid JSON".
I’ve actually been testing stuff like this lately while working on the AI assistant for Atest — handling text/plain properly would help avoid weird edge case bugs later on. Seems like a good one to sort out early.
Let me know if there’s anything I should be careful about!
hi @KariHall619 thanks for your time. In most cases, an API will return data in JSON format. But we cannot see the data if it's plain/text. No further particular things.
When sending a request with Content-Type
text/plain;charset=UTF-8
, the tool incorrectly attempts to parse the response as JSON and throws an error: "Unexpected token '测', '测试' is not valid JSON".Steps to Reproduce
Create a GET request with:
http://localhost:8080/api/hello/message?key=testMessage
Content-Type: text/plain;charset=UTF-8
Send the request containing plain text content ("测试") in the body.
Expected Behavior
The tool should:
Actual Behavior
Additional Context
Proposed Fix
Modify the response handling to:
The text was updated successfully, but these errors were encountered: