Show / Hide Table of Contents

Class ResponseHelper

A utility class to read response content.

Inheritance
object
ResponseHelper
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Oci.Common.Http.Internal
Assembly: OCI.DotNetSDK.Common.dll
Syntax
public class ResponseHelper

Fields

DEFAULT_OCI_EXCEPTION_MESSAGE

Declaration
public static string DEFAULT_OCI_EXCEPTION_MESSAGE
Field Value
Type Description
string

DEFAULT_OCI_EXCEPTION_SERVICE_CODE

Declaration
public static string DEFAULT_OCI_EXCEPTION_SERVICE_CODE
Field Value
Type Description
string

INSTANCE_PRINCIPAL_FAILURE_CODE

Declaration
public static int INSTANCE_PRINCIPAL_FAILURE_CODE
Field Value
Type Description
int

INSTANCE_PRINCIPAL_FAILURE_MESSAGE

Declaration
public static string INSTANCE_PRINCIPAL_FAILURE_MESSAGE
Field Value
Type Description
string

NOT_APPLICABLE

Declaration
public static string NOT_APPLICABLE
Field Value
Type Description
string

Methods

HandleNonSuccessfulResponse(HttpResponseMessage, ApiDetails, string)

HandleNonSuccessfulResponse will only be called to process responses return from service that are not 2xx. If this happens, throw OciException.

Declaration
public static void HandleNonSuccessfulResponse(HttpResponseMessage responseMessage, ApiDetails apiDetails = null, string caller = null)
Parameters
Type Name Description
HttpResponseMessage responseMessage

An HttpResponseMessage.

ApiDetails apiDetails
string caller

ReadEntity<T>(HttpResponseMessage)

Reads content from HttpResponseMessage and converts it into SDK response object.

Declaration
public static T ReadEntity<T>(HttpResponseMessage response)
Parameters
Type Name Description
HttpResponseMessage response

An HttpResponseMessage.

Returns
Type Description
T

An SDK response object.

Type Parameters
Name Description
T
In this article
Back to top