Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Remove 'JSON.stringify()' from constructing the body of API calls in request handlers #223

Merged
merged 1 commit into from Dec 10, 2020
Merged

Conversation

ftianli-amzn
Copy link

@ftianli-amzn ftianli-amzn commented Dec 8, 2020

Issue #, if available:

Description of changes:

In the new Kibana platform, the body of the HTTP requests have to be wrapped in { body: JSON.stringify(...) } before entering the request handlers, which was previously done in the handlers.
The PR does the code cleanup after the migration to new Kibana platform(PR #209).

  • remove 'JSON.stringfy()' from constructing the body of backend API calls in the request handler:
    body: JSON.stringify(req.body) -> body: req.body

Have manually tested the related actions can be performed correctly.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ftianli-amzn ftianli-amzn changed the title remove 'JSON.stringfy()' from constructing the body of backend api calls remove 'JSON.stringfy()' from request handlers in constructing the body of API calls Dec 8, 2020
@ftianli-amzn ftianli-amzn marked this pull request as ready for review December 8, 2020 19:19
@ftianli-amzn ftianli-amzn changed the title remove 'JSON.stringfy()' from request handlers in constructing the body of API calls Remove 'JSON.stringfy()' from constructing the body of API calls in request handlers Dec 8, 2020
@ftianli-amzn ftianli-amzn changed the title Remove 'JSON.stringfy()' from constructing the body of API calls in request handlers Remove 'JSON.stringify()' from constructing the body of API calls in request handlers Dec 9, 2020
@ftianli-amzn ftianli-amzn merged commit 78bcd45 into opendistro-for-elasticsearch:master Dec 10, 2020
@ftianli-amzn ftianli-amzn deleted the edit_body_of_backend_api_call branch December 10, 2020 00:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants