IHttpPollingHandler.cs 686 B

123456789101112131415161718
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Net.Http;
  4. using System.Threading;
  5. using System.Threading.Tasks;
  6. namespace SocketIOClient.Transport
  7. {
  8. public interface IHttpPollingHandler : IDisposable
  9. {
  10. IObservable<string> TextObservable { get; }
  11. IObservable<byte[]> BytesObservable { get; }
  12. Task GetAsync(string uri, CancellationToken cancellationToken);
  13. Task SendAsync(HttpRequestMessage req, CancellationToken cancellationToken);
  14. Task PostAsync(string uri, string content, CancellationToken cancellationToken);
  15. Task PostAsync(string uri, IEnumerable<byte[]> bytes, CancellationToken cancellationToken);
  16. }
  17. }