我正在使用Google Healthcare API并尝试按日期和时区搜索杉树资源,如下例所示:
https://healthcare.googleapis.com/v1/projects/project-id/locations/us-central1/datasets/dataset/fhirStores/fhirstore/fhir/Appointment?date=2020-01-23T08:29:00+03:00我得到了这个错误:
{
"issue": [
{
"code": "value",
"details": {
"text": "invalid_query"
},
"diagnostics": "error parsing date \"2020-01-23T08:29:00 03:00\": invalid dateTime: 2020-01-23T08:29:00 03:00",
"severity": "error"
}
],
"resourceType": "OperationOutcome"
}Date searches on any type of date, time, or period. The date parameter format is yyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm], and the same prefix modifiers used for number also apply here.它应该可以工作,但是当时区信号是“加号+”时。它会抛出一个错误。何时是“减号-”ex: /Appointment?date=2020-01-23T08:29:00-03:00。它起作用了。
我是不是遗漏了什么?在我看来这是个bug。
谢谢!
发布于 2020-09-10 03:27:09
看起来像是URL转义问题-加号是URL中的特殊字符之一。
Try date=2020-01-23T08:29:00%2B03:00,当我尝试时,这是有效的。
https://stackoverflow.com/questions/63818046
复制相似问题