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

Add response headers option support + add HEAD HTTP request method mocking support #206

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NeilujD
Copy link

@NeilujD NeilujD commented Jan 12, 2024

Some informations I need to mock are only existing in the response headers.
I thus implemented a simple way to support that in this addon.

Here is how it should work:

...
mockData: [
  {
    url: "/my-url",
    method: 'HEAD',
    status: 200,
    responseHeaders: {
      'X-Cache-Status': 'HIT'
    },
    response: {}
  }
]
...

Copy link

netlify bot commented Jan 12, 2024

Deploy Preview for storybook-addon-mock failed.

Name Link
🔨 Latest commit c39e86a
🔍 Latest deploy log https://app.netlify.com/sites/storybook-addon-mock/deploys/65a16e5fae406a00087bc8ba

@NeilujD NeilujD changed the title Add response headers option support + add HEAD HTTM request method mocking support Add response headers option support + add HEAD HTTP request method mocking support Jan 12, 2024
@dcitron
Copy link

dcitron commented Sep 14, 2024

Hi, @nutboltu -- is there any chance that we can include this or something like it? It would be much appreciated!

@nutboltu
Copy link
Collaborator

@dcitron the PR needs some work to pass the build. If anyone can contribute on it, I'm happy to review and release.

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.

3 participants