azure-functions-java-worker icon indicating copy to clipboard operation
azure-functions-java-worker copied to clipboard

Enable use of nullable maps for headers, params and query

Open kamperiadis opened this issue 2 years ago • 1 comments

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: image 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. beforeChanges 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. withChanges

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
  • [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)

kamperiadis avatar Jan 20 '23 21:01 kamperiadis

Once this feature is released, need to document it somewhere (repo wiki?) for customer. Maybe create an issue to track creating the document.

kaibocai avatar Jan 26 '23 14:01 kaibocai