Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass along request object to all HTTP interceptors #47258

Merged

Conversation

eliperelman
Copy link
Contributor

Summary

Make the HTTP Request instance available to all interceptors. Allow returning partials from response interceptors.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

Dev Docs

Make the Request instance available to all HTTP interceptors, which is now in a read-only state. You may now also under-specify the object returned from HTTP response interceptors to only overwrite specific properties.

@eliperelman eliperelman added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:New Platform release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. v8.0.0 v7.5.0 labels Oct 3, 2019
@eliperelman eliperelman requested a review from a team as a code owner October 3, 2019 19:40
@eliperelman eliperelman self-assigned this Oct 3, 2019
@eliperelman eliperelman added this to Code review in kibana-core [DEPRECATED] via automation Oct 3, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@elasticmachine
Copy link
Contributor

💔 Build Failed

src/core/public/http/http_service.test.ts Outdated Show resolved Hide resolved
src/core/public/http/http_setup.ts Outdated Show resolved Hide resolved
src/core/public/http/http_setup.ts Outdated Show resolved Hide resolved
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@eliperelman
Copy link
Contributor Author

eliperelman commented Oct 15, 2019

@kobelb @joshdover PR updated, please review the commits from ebda478 forward.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@joshdover
Copy link
Contributor

retest

Copy link
Contributor

@joshdover joshdover left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks right to me. I'll defer to @kobelb on whether this meets his needs.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

src/core/public/http/http_setup.ts Outdated Show resolved Hide resolved
src/core/public/http/http_setup.ts Show resolved Hide resolved
@elasticmachine
Copy link
Contributor

💔 Build Failed

@eliperelman
Copy link
Contributor Author

@kobelb PR updated, commits 084b3b4 and a76d46c are the updates to review.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@kobelb
Copy link
Contributor

kobelb commented Oct 18, 2019

ACK: Will review later this afternoon ❤️

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@eliperelman eliperelman merged commit ab147e1 into elastic:master Oct 18, 2019
kibana-core [DEPRECATED] automation moved this from Code review to Needs Backport Oct 18, 2019
eliperelman added a commit to eliperelman/kibana that referenced this pull request Oct 18, 2019
* Pass along request object to all HTTP interceptors

* Do not trigger response interceptors from request errors; make request readonly

* Update core API

* Fix failing test

* Add tests to ensure that interceptors accumulate request and response across calls

* Make request readonly for request error interception, simplify response interception return types

* Update docs from request and response interception API change

* Add missing InterceptedHttpResponse generated docs
eliperelman added a commit that referenced this pull request Oct 18, 2019
* Pass along request object to all HTTP interceptors

* Do not trigger response interceptors from request errors; make request readonly

* Update core API

* Fix failing test

* Add tests to ensure that interceptors accumulate request and response across calls

* Make request readonly for request error interception, simplify response interception return types

* Update docs from request and response interception API change

* Add missing InterceptedHttpResponse generated docs
@eliperelman eliperelman moved this from Needs Backport to Done (7.6) in kibana-core [DEPRECATED] Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:New Platform release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.6.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants