public TriggerResult ( HttpResponseMessage response, string responseContent ) : System | ||
response | HttpResponseMessage | The Rest Response which will form the basis of this Trigger Result |
responseContent | string | The response content as a string |
Résultat | System |
public TriggerResult(HttpResponseMessage response, string responseContent)
: base(response, responseContent)
{
EventIdData eventIdData = null;
try
{
eventIdData = JsonConvert.DeserializeObject<EventIdData>(responseContent);
}
catch (Exception)
{
string msg = $"The response body from the Pusher HTTP endpoint could not be parsed as JSON: {Environment.NewLine}{response.Content}";
throw new TriggerResponseException(msg);
}
EventIds = new ReadOnlyDictionary<string, string>(eventIdData.event_ids);
}