Show / Hide Table of Contents

Class ResponseMessage

Default class that message of response.

Inheritance
System.Object
ResponseMessage
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: StoneCo.Framework.Services
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
public class ResponseMessage

Properties

DefaultResponseHeaders

Default request headers.

Declaration
public virtual IDictionary<string, string> DefaultResponseHeaders { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.String, System.String>

status: 200

Methods

AddHeader(String, String)

Add or update items in the header.

If the value is null or empty, the item will not be added or updated in the header.

Declaration
public virtual ResponseMessage AddHeader(string key, string value)
Parameters
Type Name Description
System.String key

Key to identify value on header.

System.String value

Value that represents the key on header.

Returns
Type Description
ResponseMessage
Examples

Bar class used in this example.

public class Bar
{
    public void SetHeader()
    {
        var response = new ResponseMessage();
        response.AddHeader(Headers.Tracekey, Guid.NewGuid().ToString("N"));
    }
}

GetHeader(String)

Get header value by the key.

Declaration
public virtual string GetHeader(string key)
Parameters
Type Name Description
System.String key

Key to identify value on header.

Returns
Type Description
System.String

Value that represents the key on header.

Examples

Bar class used in this example.

public class Bar
{
    public void GetHeader()
    {
        var response = new ResponseMessage();
        var valueOfheader = response.GetHeader("status");
    }
}
Back to top Generated by DocFX