OCISDK/OCISDK/Identity/identityClient.cs
/// <summary>
/// Gets the specified user's information.
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Gets the specified user's information.
Gets the specified user ' s information .
public GetUserResponse GetUser(GetUserRequest request)
        {
            var uri = new Uri($"{GetEndPoint(IdentityServices.Users, this.Region)}/{request.UserId}");
            using (var webResponse = this.RestClient.Get(uri))
            using (var stream = webResponse.GetResponseStream())
            using (var reader = new StreamReader(stream))
            {
                var response = reader.ReadToEnd();
                return new GetUserResponse()
                {
                    User = JsonSerializer.Deserialize<UserDetails>(response),
                    OpcRequestId = webResponse.Headers.Get("opc-request-id"),
                    ETag = webResponse.Headers.Get("ETag")
                };
            }
        }
public GetUserResponse GetUser ( GetUserRequest request ) { var uri = new Uri ( $" { GetEndPoint ( IdentityServices . Users , this . Region ) } / { request . UserId } " ) ; using ( var webResponse = this . RestClient . Get ( uri ) ) using ( var stream = webResponse . GetResponseStream ( ) ) using ( var reader = new StreamReader ( stream ) ) { var response = reader . ReadToEnd ( ) ; return new GetUserResponse ( ) { User = JsonSerializer . Deserialize < UserDetails > ( response ) , OpcRequestId = webResponse . Headers . Get ( " " ) , ETag = webResponse . Headers . Get ( " " ) } ; } }
Gets the specified user's information.
Gets the specified user ' s information .
None
request
GetUserRequest
None