Class RequestModuleExtensions
Set of extension methods used to bring request module support
Inherited Members
Namespace: PnP.Core.Model
Assembly: PnP.Core.dll
Syntax
public static class RequestModuleExtensions
Methods
WithHeaders<TModel>(ISupportModules<TModel>, Dictionary<string, string>, Action<Dictionary<string, string>>)
Executes this request with additional request headers
Declaration
public static TModel WithHeaders<TModel>(this ISupportModules<TModel> dataModel, Dictionary<string, string> headers, Action<Dictionary<string, string>> responseHeaders = null)
Parameters
|
ISupportModules<TModel>
dataModel
Model instance to operate on |
|
Dictionary<string, string>
headers
Collection of headers to add to add to the request |
|
Action<Dictionary<string, string>>
responseHeaders
Delegate that can be invoked to pass along the response headers |
Returns
|
TModel
The passed model instance |
Type Parameters
|
TModel
Model type |
WithResponseHeaders<TModel>(ISupportModules<TModel>, Action<Dictionary<string, string>>)
Returns the response headers for Microsoft Graph, SharePoint REST and CSOM requests after this request has been executed
Declaration
public static TModel WithResponseHeaders<TModel>(this ISupportModules<TModel> dataModel, Action<Dictionary<string, string>> responseHeaders = null)
Parameters
|
ISupportModules<TModel>
dataModel
Model instance to operate on |
|
Action<Dictionary<string, string>>
responseHeaders
Delegate that can be invoked to receive the response headers |
Returns
|
TModel
The passed model instance |
Type Parameters
|
TModel
Model type |