This removes keys with empty values from input objects before interpolating them into templated URIs.
Otherwise an input like this:
{
"foo": 1,
"bar": ""
}
.. Get's mapped to a URI like this:
host.com?foo=1&bar=
With this change, the case above results in
host.com?foo=1
null or empty string fields will be ignored. Not sure this is desirable for all cases but it makes sense as a rule of thumb.
Why
The same can be achieved by editing the input object manually in the provided text-area and removing the unwanted properties, but that gets annoying when there are too many optional properties.
What
This removes keys with empty values from input objects before interpolating them into templated URIs.
Otherwise an input like this:
.. Get's mapped to a URI like this:
With this change, the case above results in
null
or empty string fields will be ignored. Not sure this is desirable for all cases but it makes sense as a rule of thumb.Why
The same can be achieved by editing the input object manually in the provided text-area and removing the unwanted properties, but that gets annoying when there are too many optional properties.