Skip to content

Commit

Permalink
Store headers in a read-only dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
drakon64 committed Dec 24, 2024
1 parent 9ce02ed commit 7850bf8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
using System.Collections.ObjectModel;

namespace Ktisis.Common.Models.GoogleCloud.Tasks;

public class CloudTaskHttpRequest
{
public required string Url { get; init; }
public readonly string HttpMethod = "POST";
public readonly Dictionary<string, string> Headers = new()
public readonly ReadOnlyDictionary<string, string> Headers = new Dictionary<string, string>
{
{ "Content-Type", "application/json" },
};
}.AsReadOnly();
public required string Body { get; init; }
}

0 comments on commit 7850bf8

Please sign in to comment.