-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
I have been facing issue with curl command execution in powershell version 5.1 while the content of the body has a string inside json format. The string inside the body is not escaping. I would need your suggestion/resolution to handle this issue. Please refer the example below
example:
curl.exe -k -v -u username:password -X POST "https://localhost:18093/query/service" -H "Content-Type: application/json" -d '{"statement": "SELECT "hello""}'
error:
{
"requestID": "4389166e-40f7-4970-94b8-631b4a30f826",
"errors": [{"code":3080,"column":8,"line":1,"msg":"Ambiguous reference to field 'hello' (near line 1, column 8)."}],
"status": "fatal",
"metrics": {"elapsedTime": "2.320937ms","executionTime": "319.505µs","resultCount": 0,"resultSize": 0,"serviceLoad": 1,"errorCount": 1}
}
Expected behavior
body:
the body of the content should accept the json format and value "hello" inside the body should consider as stringActual behavior
body:
the body of the content inside the json value is not accepting as stringError details
error:
{
"requestID": "4389166e-40f7-4970-94b8-631b4a30f826",
"errors": [{"code":3080,"column":8,"line":1,"msg":"Ambiguous reference to field 'hello' (near line 1, column 8)."}],
"status": "fatal",
"metrics": {"elapsedTime": "2.320937ms","executionTime": "319.505µs","resultCount": 0,"resultSize": 0,"serviceLoad": 1,"errorCount": 1}
}Environment data
NAVisuals
No response