-
-
Notifications
You must be signed in to change notification settings - Fork 801
Open
Labels
Description
Is your feature request related to a problem? Please describe.
Several backends I use for API automation (such as Huginn) try passing every JSON parameter and value enclosed in quotes, such as "priority": "10". This causes Gotify to return a 400 because "10" is being passed to the API instead of 10, in this example.
Describe the solution you'd like
Allow for some flexibility in the parameter for parsing as string->int or int by removing quotes/apostrophes so either becomes capable.
Describe alternatives you've considered
Rewriting various backends/other software, but that's insurmountable.
Additional context
message API, title, priority, message are all set. Ex:
{
"title": "...",
"priority": "10",
"message": "...",
"body": "{\"error\":\"Bad Request\",\"errorCode\":400,\"errorDescription\":\"json: cannot unmarshal string into Go struct field MessageExternal.priority of type int\"}",
"status": 400,
"headers": {
... Removed for Brevity ...
}
}
lezruk