Skip to content

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

@joerodgers

Description

@joerodgers

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions