Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor your SendHttpRequestAsync method for better readability. #7

Open
bierquelle06 opened this issue Aug 22, 2023 · 0 comments
Open

Comments

@bierquelle06
Copy link
Member

...\src\AdsPush.Vapid\VapidPushNotificationSender.cs

And you can write meaningful steps with descriptive variable names and consistent

private async Task SendHttpRequestAsync(
VapidSubscription subscription,
string payload,
CancellationToken cancellationToken)
{
var request = CreateHttpRequest(subscription, payload);

**AddContentHeaders(request, payload);
AddVapidHeaders(request, subscription);**

return await _client.SendAsync(request, cancellationToken);

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant