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

Fetch: add headers to response #1694

Closed
nimo23 opened this issue Nov 8, 2024 · 1 comment · Fixed by #1699
Closed

Fetch: add headers to response #1694

nimo23 opened this issue Nov 8, 2024 · 1 comment · Fixed by #1699
Assignees
Labels
enhancement New feature or request fetch Fetch client related issue
Milestone

Comments

@nimo23
Copy link

nimo23 commented Nov 8, 2024

What are the steps to reproduce this issue?

  1. Generate queries by using fetch api
  2. Look into the response object
  3. No headers are in the response object

What happens?

No headers will be in the response object. The code looks like:

  const res = await fetch(getTaskResourceListAllUrl(params),
  {      
    ...options,
    method: 'GET'
  }

  )
  const data = await res.json()
  // Issue: please add the "res.headers" into the return statement
  return { status: res.status, data }
}

What were you expecting to happen?

Add headers in the response object, at least when openapi.json describes custom headers for an API endpoint.

What versions are you using?

"orval": "^7.2.0",

@melloware melloware added the fetch Fetch client related issue label Nov 8, 2024
@melloware melloware added this to the 7.2.1 milestone Nov 8, 2024
@melloware melloware self-assigned this Nov 8, 2024
@melloware
Copy link
Collaborator

@nimo23 can you review my PR i think that is what you are asking for?

@melloware melloware changed the title add headers to response Fetch: add headers to response Nov 10, 2024
@soartec-lab soartec-lab added the enhancement New feature or request label Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fetch Fetch client related issue
Projects
None yet
3 participants