bloomreach / spa-sdk

Apache License 2.0
15 stars 16 forks source link

Axios update #21

Closed ennair closed 11 months ago

ennair commented 1 year ago

I see that the sdk is still using axios 0.26.1, which is quite old. Is it possible to update this to the newest version of axios (version 1.4.0)?

SDK package.json: https://github.com/bloomreach/spa-sdk/blob/spa-sdk-22.0.0/examples/next/package.json Axios releases: https://github.com/axios/axios/releases

beetlerom commented 1 year ago

Hi @ennair. Thanks for the feedback, we plan to improve the example apps. in the future and we can update to a newer version then.

Just to be clear, that is just the example app., the SDK does not use axios or any particular version of it.

You may use any version of axios in your project (or any other http client lib), just pass along an object with the required type to the httpConfig property in the initialize function.

joerideg commented 11 months ago

Hi @ennair , Yes you just need any http client that matches with https://bloomreach.github.io/spa-sdk/modules/index.Internals.html#HttpClient

It seems the latest Axios still supports that partial type. https://axios-http.com/docs/req_config