Skip to content

Commit

Permalink
Improve Microsoft Graph Client by adding more setter for Request Head…
Browse files Browse the repository at this point in the history
…ers (#800)

#### Summary
Add setter for more Request Headers

#### Work Item(s)
Fixes #791




Fixes
[AB#521501](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/521501)
  • Loading branch information
pri-kise authored Mar 22, 2024
1 parent 1b66006 commit 2fc2bda
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,33 @@ codeunit 9353 "Graph Optional Parameters"
SetRequestHeader('IF-Match', "Value");
end;

/// <summary>
/// Sets the value for 'If-None-Match' HttpHeader for a request.
/// </summary>
/// <param name="Value">Text value specifying the HttpHeader value</param>
procedure SetIfNoneMatchRequestHeader("Value": Text)
begin
SetRequestHeader('If-None-Match', "Value");
end;

/// <summary>
/// Sets the value for 'Prefer' HttpHeader for a request.
/// </summary>
/// <param name="Value">Text value specifying the HttpHeader value</param>
procedure SetPreferRequestHeader("Value": Text)
begin
SetRequestHeader('Prefer', "Value");
end;

/// <summary>
/// Sets the value for 'ConsistencyLevel' HttpHeader for a request.
/// </summary>
/// <param name="Value">Text value specifying the HttpHeader value</param>
procedure SetConsistencyLevelRequestHeader("Value": Text)
begin
SetRequestHeader('ConsistencyLevel', "Value");
end;

local procedure SetRequestHeader(Header: Text; HeaderValue: Text)
begin
RequestHeaders.Remove(Header);
Expand Down

0 comments on commit 2fc2bda

Please sign in to comment.