Skip to content

Commit 910696c

Browse files
authored
Merge pull request #333 from microsoftgraph/dev
Allow content to be null for GET Requests (#332)
2 parents 0ac7e92 + 774d9d4 commit 910696c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Authentication/Authentication/Cmdlets/InvokeGraphRequest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -722,13 +722,13 @@ private void FillRequestStream(HttpRequestMessage request)
722722
{
723723
if (SkipHeaderValidation)
724724
{
725-
request.Content.Headers.TryAddWithoutValidation(entry.Key, entry.Value);
725+
request.Content?.Headers.TryAddWithoutValidation(entry.Key, entry.Value);
726726
}
727727
else
728728
{
729729
try
730730
{
731-
request.Content.Headers.Add(entry.Key, entry.Value);
731+
request.Content?.Headers.Add(entry.Key, entry.Value);
732732
}
733733
catch (FormatException ex)
734734
{

0 commit comments

Comments
 (0)