Send feedback
Interface IClientService (1.68.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
public interface IClientService : IDisposable
Client service contains all the necessary information a Google service requires.
Each concrete IClientServiceRequest has a reference to a service for
important properties like API key, application name, base Uri, etc.
This service interface also contains serialization methods to serialize an object to stream and deserialize a
stream into an object.
Namespace
Google.Apis.Services
Assembly
Google.Apis.dll
Properties
ApiKey
Gets the API-Key (DeveloperKey) which this service uses for all requests.
Property Value
Type
Description
string
ApplicationName
string ApplicationName { get; }
Gets the application name to be used in the User-Agent header.
Property Value
Type
Description
string
BasePath
Gets the BasePath of the service.
Property Value
Type
Description
string
BaseUri
Gets the BaseUri of the service. All request paths should be relative to this URI.
Property Value
Type
Description
string
Features
IList<string> Features { get; }
Gets the supported features by this service.
GZipEnabled
bool GZipEnabled { get; }
Gets or sets whether this service supports GZip.
Property Value
Type
Description
bool
HttpClient
ConfigurableHttpClient HttpClient { get; }
Gets the HTTP client which is used to create requests.
HttpClientInitializer
IConfigurableHttpClientInitializer HttpClientInitializer { get; }
Name
Property Value
Type
Description
string
Serializer
ISerializer Serializer { get; }
Gets the Serializer used by this service.
Methods
DeserializeError(HttpResponseMessage)
Task<RequestError> DeserializeError(HttpResponseMessage response)
DeserializeResponse<T>(HttpResponseMessage)
Task<T> DeserializeResponse<T>(HttpResponseMessage response)
Deserializes a response into the specified object.
Returns
Type
Description
Task
Type Parameter
Name
Description
T
SerializeObject(object)
string SerializeObject(object data)
Serializes an object into a string representation.
Parameter
Name
Description
data
object
Returns
Type
Description
string
SetRequestSerailizedContent(HttpRequestMessage, object)
void SetRequestSerailizedContent(HttpRequestMessage request, object body)
Sets the content of the request by the given body and the this service's configuration.
First the body object is serialized by the Serializer and then, if GZip is enabled, the content will be
wrapped in a GZip stream, otherwise a regular string stream will be used.
Extension Method
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-05 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{
"lastModified": "Last updated 2024-09-05 UTC.",
"confidential": False
}