public async Task CollectAsync(string collectUrl, IEnumerable <KeyValuePair <string, string> > collectHeaders, IIdentityServiceClientInfo collectIdentityServiceClientInfo, string dataCollectionName, string fileName, TimeSpan timeout, bool finishWait, int tryNo, CancellationToken cancellationToken) { var endpointUrl = GetEndpointUrl(DestinationConfig.CollectPostEndpoint, dataCollectionName, fileName); if (string.IsNullOrEmpty(endpointUrl)) { return; } await HttpUtils.SendAsync(endpointUrl, HttpMethod.Post, collectUrl, null, collectHeaders, null, timeout, request => _identityServiceHttpRequestConfigurator.ConfigAsync(request, DestinationConfig.IdentityServiceClientInfo, cancellationToken), cancellationToken : cancellationToken); }
public async Task CollectAsync(string collectUrl, IEnumerable <KeyValuePair <string, string> > collectHeaders, IIdentityServiceClientInfo collectIdentityServiceClientInfo, string dataCollectionName, string fileName, TimeSpan timeout, bool finishWait, int tryNo, CancellationToken cancellationToken) { var content = await HttpUtils.GetStringAsync(collectUrl, HttpMethod.Get, null, collectHeaders, null, timeout, request => _identityServiceHttpRequestConfigurator.ConfigAsync(request, collectIdentityServiceClientInfo, cancellationToken), cancellationToken : cancellationToken); System.Console.WriteLine(content); }