Skip to content

HttpClientService

Sam Gerene edited this page May 21, 2018 · 2 revisions

The satsearch API is exposed over HTTP. The HttpClientService class is used to create a reusable instance of the HttpClient class. The HttpClientService implements the IHttpClientService interface and is injectable using MEF.

The IHttpClientService is a dependency of the SatSearchService, the SatSearchService uses it as a factory to create and request an HttpClient with the approriate HTTP headers set, such as the API-Tokens.

An API developer does not need to use HttpClientService directly, it only needs to be provided to the SatSearchService, preferable by means of dependency injection using a framework like MEF.

var uri = new Uri("https://api.satsearch.co");
var credentials = new Credentials("API-Token", "your-Application-Token", uri)

var httpClientService = HttpClientService();
var httpClient = httpClientService.QueryHttpClient(credentials);

satsearch-SDK

  1. Home
  2. Documentation Overview
  3. Getting your API tokens
  4. Roadmap

Library guts explained

  1. Credentials
  2. HttpClientService
  3. Serializer
  4. SatSearchService

Clone this wiki locally