inveniosoftware / react-invenio-deposit

React application for Invenio deposit forms.
https://react-invenio-deposit.readthedocs.io
MIT License
3 stars 45 forks source link

deposit api: Config api headers #583

Closed philippgualdi closed 1 year ago

philippgualdi commented 1 year ago

The implementation allows you to configure the BASE_HEADERS for other modules using the DepositFormApp and the REST api client.

ntarocco commented 1 year ago

@philippgualdi would you have some time to chat about these changes? In generally, it is a very good change, we can customize the headers sent to backend. Practically, I think that we could do something slightly different: others might have the need to configure headers per endpoint (different headers on GET or POST), or maybe other needs.

Given that now we want to allow more configurability (while before it was not the case), why not exposing the full axios configuration? We did the exact same change in react-searchkit.

philippgualdi commented 1 year ago

LGTM! Thank you! @kpsherva @zzacharo if you are happy with this, we can merge and release! @philippgualdi do you need this backported it to any release?

Backported to an older release is not necessary. I appreciate your quick response, thank you! :)