Skip to content

Question: Is there any reason why global axios defaults shouldn't be used in api-client.ts? #240

@cmacdonnacha

Description

@cmacdonnacha

As per title, I was curious if there's any reason why global axios defaults shouldn't be used in api-client.ts?

So instead of:

  if (config.headers) {
    config.headers.Accept = 'application/json';
  }

you'd have:

axios.defaults.headers.common.Accept = 'application/json';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions