Class RestRequest

    Definition

    Namespace:
    Tizen.AIAvatar
    Assembly:
    Tizen.AIAvatar.dll

    Represents a RESTful API request.

    public class RestRequest
    Inheritance
    object
    RestRequest

    Constructors

    View Source

    RestRequest(string, Method)

    Initializes a new instance of the RestRequest class with the specified resource and HTTP method.

    Declaration
    public RestRequest(string resource, Method method)
    Parameters
    Type Name Description
    string resource

    The resource URI for the request.

    Method method

    The HTTP method to use for the request.

    View Source

    RestRequest(Method)

    Initializes a new instance of the RestRequest class with the specified HTTP method.

    Declaration
    public RestRequest(Method method)
    Parameters
    Type Name Description
    Method method

    The HTTP method to use for the request.

    Properties

    View Source

    Method

    The HTTP method to use for the request.

    Declaration
    public Method Method { get; }
    Property Value
    Type Description
    Method
    View Source

    Resource

    The resource URI for the request.

    Declaration
    public string Resource { get; }
    Property Value
    Type Description
    string

    Methods

    View Source

    AddHeader(string, string)

    Adds a header to the request.

    Declaration
    public RestRequest AddHeader(string name, string value)
    Parameters
    Type Name Description
    string name

    The name of the header.

    string value

    The value of the header.

    Returns
    Type Description
    RestRequest

    The current instance of RestRequest.

    View Source

    AddJsonBody(object)

    Adds a JSON body to the request.

    Declaration
    public RestRequest AddJsonBody(object body)
    Parameters
    Type Name Description
    object body

    The object to serialize as JSON and include in the request body.

    Returns
    Type Description
    RestRequest

    The current instance of RestRequest.

    View Source

    AddJsonStringBody(string)

    Adds a JSON string body to the request.

    Declaration
    public RestRequest AddJsonStringBody(string jsonString)
    Parameters
    Type Name Description
    string jsonString

    The JSON string to include in the request body.

    Returns
    Type Description
    RestRequest

    The current instance of RestRequest.

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX