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

[FEATURE] Add ability to retrieve response headers from calls to Invoke-PnPSPRestMethod #2706

Closed
joerodgers opened this issue Jan 6, 2023 · 0 comments · Fixed by #2711
Closed
Assignees
Labels
enhancement New feature or request

Comments

@joerodgers
Copy link

Is your feature request related to a problem? Please describe.
To support using the _api/$batch endpoint with the Invoke-PnPSPRestMethod, developers need to read the response Content-Type value to obtain the batch response GUID. Currently there is no method to obtain these values:

Content-Type: multipart/mixed; boundary=batch_ea22ce53-542d-4abb-8882-5056372c5c3e

Describe the solution you'd like
Mimicking the functionality in the native Invoke-RestMethod cmdlet, add an optional parameter called *-ResponseHeadersVariable which creates a variable containing a Response Headers Dictionary. The keys of the dictionary contain the field names and values of the Response Header returned by the web server.

Describe alternatives you've considered
Using the native Invoke-RestMethod function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants