Skip to content

feat: Add support for setting additional headers and strictApi #74

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

Merged

Conversation

jimmycallin
Copy link
Contributor

Resolves FT-1b5069d6-a6dc-11ed-8149-8a547ff3bf63

  • I have added automatic tests where applicable
  • The PR title is suitable as a release note
  • The PR contains a description of what has been changed
  • The description contains manual test instructions

Changes

  • Adds support for additional custom headers, both on session level and call level
  • Adds support for turning on strict API mode

Test

  • When strict API is turned on, make sure ftrack-strict-api: true is sent as header.

@jimmycallin jimmycallin requested a review from a team as a code owner February 10, 2023 14:44
@jimmycallin jimmycallin changed the title feat: add support for setting additional headers and strictApi feat: Add support for setting additional headers and strictApi Feb 10, 2023
@gismya
Copy link
Contributor

gismya commented Feb 14, 2023

I want to see some kind of end-user-facing documentation for this.

Copy link
Contributor

@bjornrydahl bjornrydahl left a comment

Choose a reason for hiding this comment

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

Looks good from my point of view!

Copy link
Contributor

@bjornrydahl bjornrydahl left a comment

Choose a reason for hiding this comment

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

Approved, but have not tested it only looked at the code. Expecting someone else to test.

@jimmycallin jimmycallin merged commit dabb0c9 into main Feb 20, 2023
@jimmycallin jimmycallin deleted the backlog/add-support-for-strict-api-calls-in-js-client branch February 20, 2023 11:01
@@ -23,6 +23,8 @@ Construct Session instance with API credentials.
:param Array [options.serverInformationValues=[]]: Optional list of server information values to retrieve.
:param Object [options.eventHubOptions={}]: Options to configure event hub with.
:param string [options.clientToken=null]: Client identifier included in update events caused by operations performed by this session.
:param Object [options.headers]: Additional headers to send with the request

Choose a reason for hiding this comment

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

Shouldn't this be options.additionalHeaders?

@@ -95,11 +97,13 @@ export interface ResponseError {

export interface MutatationOptions {

Choose a reason for hiding this comment

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

MutatationOptions ? ;)

gismya pushed a commit that referenced this pull request May 15, 2023
* feat: add support for setting additional headers and strictApi

* docs: update documentation

* updated docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants