azure-functions-java-worker
azure-functions-java-worker copied to clipboard
Enable use of nullable maps for headers, params and query
BREAKING CHANGE: Enabled the UseNullableValueDictionaryForHttp
capability which makes the host send back request information in nullable maps (i.e. When the UseNullableValueDictionaryForHttp
capability is enabled, the host stores the values in nullable_headers
, nullable_params
and nullable_query
instead of headers
, params
and query
)
Issue describing the changes in this PR
Context:
This is the sample function app code run for the screenshots below:
Before:
Without this capability, if the customer were to set an empty string as the query value, the host would not add the entry to the query map. This means that if the customer were to try to access that entry from the query map (via the
getQueryParameters
function), they would just get null
.
After:
With this capability, if the customer were to set an empty string as the query value, the host would add the entry to the query map with the value just being the empty string.
This is meant to resolve issue #683
Pull request checklist
- [ ] My changes do not require documentation changes
- [ ] Otherwise: Documentation issue linked to PR
- [ ] My changes should not be added to the release notes for the next release
- [ ] Otherwise: I've added my notes to
release_notes.md
- [ ] Otherwise: I've added my notes to
- [x] My changes do not need to be backported to a previous version
- [ ] Otherwise: Backport tracked by issue/PR #issue_or_pr
- [x] I have added all required tests (Unit tests, E2E tests)
Once this feature is released, need to document it somewhere (repo wiki?) for customer. Maybe create an issue to track creating the document.