Table of Contents

Class RequestModuleExtensions

Namespace
PnP.Core.Model
Assembly
PnP.Core.dll

Set of extension methods used to bring request module support

public static class RequestModuleExtensions
Inheritance
RequestModuleExtensions
Inherited Members

Methods

WithHeaders<TModel>(ISupportModules<TModel>, Dictionary<string, string>, Action<Dictionary<string, string>>)

Executes this request with additional request headers

public static TModel WithHeaders<TModel>(this ISupportModules<TModel> dataModel, Dictionary<string, string> headers, Action<Dictionary<string, string>> responseHeaders = null)

Parameters

dataModel ISupportModules<TModel>

Model instance to operate on

headers Dictionary<string, string>

Collection of headers to add to add to the request

responseHeaders Action<Dictionary<string, string>>

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

public static TModel WithResponseHeaders<TModel>(this ISupportModules<TModel> dataModel, Action<Dictionary<string, string>> responseHeaders = null)

Parameters

dataModel ISupportModules<TModel>

Model instance to operate on

responseHeaders Action<Dictionary<string, string>>

Delegate that can be invoked to receive the response headers

Returns

TModel

The passed model instance

Type Parameters

TModel

Model type