Reputation: 1553
I would like to do a DELETE
request with unspecified number of parameters a=someValue
. There is 2 main ways of supplying parameters to my understanding
Query parameters. ?a=someValue
. This approach turn everything into
string and since I allow any number of parameters, I cannot know
which one is String, Boolean or Integer
Parameters in Body.This approach goes against the spec of DELETE
operation to not have a body. Some server even strip away the body-content. But as I
send an json object, user can specify which type of value each of
their parameters has.
What would be your approach for this?
Upvotes: 0
Views: 415
Reputation: 667
I'd use query parameters over body as the DELETE method has an optional body. Some clients may choose to ignore the body totally.
Upvotes: 1