public CloudFoundryClientV2(IOptions <CloudFoundryServicesOptions> cfOptions, IOptions <CfServiceBinding> cfServiceOptions, ILogger <CloudFoundryClientV2> logger, ISimpleHttpClient simpleHttpClient) : base(cfOptions, cfServiceOptions, logger) { SimpleHttp = simpleHttpClient; this.InitEndpoints(); }
public SearchChecker( ISimpleHttpClient simpleHttpClient, string endpoint) { _simpleHttpClient = simpleHttpClient; _endpoint = endpoint; }
public RegistrationHiveCopier( IRegistrationClient registrationClient, ISimpleHttpClient simpleHttpClient, ILogger <RegistrationHiveCopier> logger) { _registrationClient = registrationClient; _simpleHttpClient = simpleHttpClient; _logger = logger; }
public SearchChecker( ISimpleHttpClient simpleHttpClient, string endpoint, PortExpander portExpander) { _portExpander = portExpander; _simpleHttpClient = simpleHttpClient; _endpoint = endpoint; }
internal TorSharpToolFetcher( TorSharpSettings settings, HttpClient client, ISimpleHttpClient simpleHttpClient, IProgress <DownloadProgress> progress) { _settings = settings; _simpleHttpClient = simpleHttpClient; _progress = progress; _privoxyFetcher = new PrivoxyFetcher(settings, client); _torFetcher = new TorFetcher(settings, client); }
public static void Delete(this ISimpleHttpClient client, string url) { var task = Task.Factory.StartNew(() => client.Send <string>(HttpMethod.Delete, url)); task.Wait(); var responseCode = task.Result.Result.Response.StatusCode; if (responseCode != HttpStatusCode.OK) { throw new Exception($"Http return error {responseCode.ToString()}"); } }
public LoggregatorLog(IOptions <CFConfiguration> cfOPtions, ISimpleHttpClient simpleHttpClient, ILoggregatorWebSocket webSocket, IProtobufSerializer protobufSerializer) { this.LoggregatorEndpoint = new Uri(cfOPtions?.Value?.LogAggregationUrl); if (!string.IsNullOrWhiteSpace(cfOPtions?.Value?.Proxy)) { this.HttpProxy = new Uri(cfOPtions?.Value?.Proxy); } this.SkipCertificateValidation = (bool)cfOPtions?.Value?.SkipCertificateValidation; this.webSocket = webSocket; this.protobufSerializer = protobufSerializer; httpClient = simpleHttpClient; }
public static void Put <T>(this ISimpleHttpClient client, string path, T postBody) { var task = Task.Factory.StartNew(() => client.Send <string>(HttpMethod.Put, path, null, postBody)); task.Wait(); var responseCode = task.Result.Result.Response.StatusCode; if (responseCode != HttpStatusCode.OK) { throw new Exception($"Http return error {responseCode.ToString()}"); } }
public static T Get <T>(this ISimpleHttpClient client, string path) { var task = Task.Factory.StartNew(() => client.Send <string>(HttpMethod.Get, path)); task.Wait(); var responseCode = task.Result.Result.Response.StatusCode; if (responseCode != HttpStatusCode.OK) { throw new Exception($"Http return error {responseCode.ToString()}"); } return(JsonConvert.DeserializeObject <T>(task.Result.Result.Body)); }
public async Task <bool> Connect(string serviceUri) { client = JsonHttpClient.Create(serviceUri + baseApiPath, AddAuthorization); try { var result = await client.Send <string>(HttpMethod.Get, "/"); return(result.Response.StatusCode == HttpStatusCode.OK); } catch { return(false); } }
public RegistrationClient(ISimpleHttpClient simpleHttpClient) { _simpleHttpClient = simpleHttpClient ?? throw new ArgumentNullException(nameof(simpleHttpClient)); }
/// <summary> /// Initializes the class /// </summary> protected AbstractUserProvidedServiceInstancesEndpoint(ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { }
internal UserProvidedServiceInstancesEndpoint(CloudFoundryClientV2 client, ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { this.Client = client; }
/// <summary> /// Initializes the class /// </summary> protected AbstractSecurityGroupRunningDefaultsEndpoint(ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { }
/// <summary> /// Initializes the class /// </summary> protected AbstractSecurityGroupsEndpoint(ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { }
internal ServiceUsageEventsEndpoint(CloudFoundryClientV2 client, ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { this.Client = client; }
internal StacksEndpoint(CloudFoundryClientV2 client, ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { this.Client = client; }
internal ProcessesExperimentalEndpoint(CloudFoundryClientV3 client, ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { this.Client = client; }
internal FeatureFlagsEndpoint(CloudFoundryClientV2 client, ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { this.Client = client; }
/// <summary> /// Initializes the class /// </summary> protected AbstractFeatureFlagsEndpoint(ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { }
protected BaseEndpoint(ISimpleHttpClient simpleHttpClient) => _httpClient = simpleHttpClient;
/// <summary> /// Initializes the class /// </summary> protected AbstractBlobstoresEndpoint(ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { }
public TaskResourceEndPoint(CloudFoundryClientV3 client, ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { this.Client = client; }
internal ServicePlanVisibilitiesEndpoint(CloudFoundryClientV2 client, ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { this.Client = client; }
/// <summary> /// Initializes the class /// </summary> protected AbstractServicePlanVisibilitiesEndpoint(ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { }
/// <summary> /// Initializes the class /// </summary> protected AbstractProcessesExperimentalEndpoint(ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { }
/// <summary> /// Initializes the class /// </summary> protected AbstractStacksEndpoint(ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { }
internal SecurityGroupRunningDefaultsEndpoint(CloudFoundryClientV2 client, ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { this.Client = client; }
/// <summary> /// Initializes the class /// </summary> protected AbstractServiceUsageEventsEndpoint(ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { }
protected AbstractTaskResourceEndPoint(ISimpleHttpClient simpleHttpClient) : base(simpleHttpClient) { }