• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class WebApiException

Represents a non successful response while executing a WebApi call.

Inheritance
System.Object
WebApiException
Namespace: DotNetNuke.Web.Api
Assembly: DotNetNuke.Web.dll
Syntax
public class WebApiException : Exception

Constructors

| Improve this Doc View Source

WebApiException(Exception, HttpResponseMessage, String)

Initializes a new instance of the WebApiException class.

Declaration
public WebApiException(Exception innerException, HttpResponseMessage result, string body)
Parameters
Type Name Description
Exception innerException

The original exception.

HttpResponseMessage result

The result of the request.

System.String body

The body from the GET response.

| Improve this Doc View Source

WebApiException(Exception, HttpResponseMessage)

Initializes a new instance of the WebApiException class, with the specified inner exception and response. message that caused the exception.

Declaration
public WebApiException(Exception innerException, HttpResponseMessage result)
Parameters
Type Name Description
Exception innerException

The original exception.

HttpResponseMessage result

The result of the request.

Properties

| Improve this Doc View Source

Body

Gets body from the Get Response. Available when exception is thrown as well.

Declaration
public string Body { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Result

Gets the result of the request. Can be used to retrieve additional info like HTTP status code.

Declaration
public HttpResponseMessage Result { get; }
Property Value
Type Description
HttpResponseMessage

Methods

| Improve this Doc View Source

BodyAsJson()

Represents a non successful response while executing a WebApi call.

Declaration
public dynamic BodyAsJson()
Returns
Type Description
System.Object

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS