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

Directus SDK - Transport options ignored #9712

Closed
3 tasks done
dstoyanoff opened this issue Nov 11, 2021 · 0 comments · Fixed by #9725
Closed
3 tasks done

Directus SDK - Transport options ignored #9712

dstoyanoff opened this issue Nov 11, 2021 · 0 comments · Fixed by #9725
Assignees

Comments

@dstoyanoff
Copy link
Contributor

Preflight Checklist

Describe the Bug

According to the documentation, we can pass any headers and params upon initializing the Directus SDK
image

Doing so however has no effect.

I've checked the code and it seems that those parameters are ignored - https://github.com/directus/directus/blob/main/packages/sdk/src/base/directus.ts#L100

In this piece of code, it seems that the final request only respects the config object, which is the local request data, but it does not include this._options.transport.*

To Reproduce

new Directus(url, {
  transport: {
     params: {
       param1: "value1"
     }
  }
})

Errors Shown

No response

What version of Directus are you using?

9.0.0

What version of Node.js are you using?

16

What database are you using?

postgres

What browser are you using?

chrome

What operating system are you using?

macOS

How are you deploying Directus?

Docker

@joselcvarela joselcvarela self-assigned this Nov 11, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants