1
I’m using Postman to make the call at the API. That returns me this result in the body:
that comes from this abstract class:
public abstract class ResponseBase
{
public long SessionId { get; set; }
}
that after taking the value of the property falls into this class method BasicAuthHttpModule
:
private static void OnApplicationEndRequest(object sender, EventArgs e)
{
var response = HttpContext.Current.Response;
//response.AddHeader("SessionId", )
if (response.StatusCode == 401)
{
response.Headers.Add("WWW-Authenticate",
string.Format("Basic realm=\"{0}\"", Realm));
}
}
How I pass the property value SessionId
to the Header
of Sponse?
In that class OnApplicationEndRequest
I don’t have access to SessionId
, do not know where it is stored, to be passed in return and appear the value in Postman.
What is this class
ResponseBase
?– Jéf Bueno
@jbueno various actions in the API return Sessionid, their classes inherit this class for access.
– Vinicius