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
cpprest: Add conversion for bool in query param (#71)
Due to c++ conversion rules, bools in query parameters were passed as 1
an 0 (using a bool -> int implicit conversion) instead of true and false.
The OpenAPI 3 spec has this to say about the value of a boolean:
> Boolean
> type: boolean represents two values: true and false. Note that truthy and
> falsy values such as "true", "", 0 or null are not considered boolean values.
This commit adds a util function to convert a bool query param into a
true or false as a query param.
Before:
GET /foo?bar=0 HTTP/1.1
After:
GET /foo?bar=false HTTP/1.1
0 commit comments