/// <summary> /// Gets the server's current date-time in UTC format /// </summary> /// <exception cref="DateTimeMicroservice.Client.OpenApiGenerated.Client.ApiException">Thrown when fails to make API call</exception> /// <returns>ApiResponse of DateTimeObject</returns> public DateTimeMicroservice.Client.OpenApiGenerated.Client.ApiResponse <DateTimeObject> GetUtcDateTimeWithHttpInfo() { DateTimeMicroservice.Client.OpenApiGenerated.Client.RequestOptions localVarRequestOptions = new DateTimeMicroservice.Client.OpenApiGenerated.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; var localVarContentType = DateTimeMicroservice.Client.OpenApiGenerated.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = DateTimeMicroservice.Client.OpenApiGenerated.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } // make the HTTP request var localVarResponse = this.Client.Get <DateTimeObject>("/currentTime", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetUtcDateTime", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// Gets the server's current date-time in UTC format /// </summary> /// <exception cref="DateTimeMicroservice.Client.OpenApiGenerated.Client.ApiException">Thrown when fails to make API call</exception> /// <returns>Task of ApiResponse (DateTimeObject)</returns> public async System.Threading.Tasks.Task <DateTimeMicroservice.Client.OpenApiGenerated.Client.ApiResponse <DateTimeObject> > GetUtcDateTimeAsyncWithHttpInfo() { DateTimeMicroservice.Client.OpenApiGenerated.Client.RequestOptions localVarRequestOptions = new DateTimeMicroservice.Client.OpenApiGenerated.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; foreach (var _contentType in _contentTypes) { localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); } foreach (var _accept in _accepts) { localVarRequestOptions.HeaderParameters.Add("Accept", _accept); } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync <DateTimeObject>("/currentTime", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetUtcDateTime", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }