Esempio n. 1
0
 public MoesifResponse(JObject response)
 {
     eventType       = JObjectUtil.getString(response, MessageCommonParams.EVENT_TYPE);
     messageId       = JObjectUtil.getString(response, MessageCommonParams.MESSAGE_ID);
     statusCode      = JObjectUtil.getString(response, MessageResponseParams.STATUS_CODE);
     responseHeaders = JObjectUtil.getString(response, MessageResponseParams.HEADERS);
     responseBody    = JObjectUtil.getString(response, MessageResponseParams.BODY);
 }
Esempio n. 2
0
 public MoesifRequest(JObject request)
 {
     eventType          = JObjectUtil.getString(request, MessageCommonParams.EVENT_TYPE);
     messageId          = JObjectUtil.getString(request, MessageCommonParams.MESSAGE_ID);
     method             = JObjectUtil.getString(request, MessageRequestParams.METHOD);
     uri                = JObjectUtil.getString(request, MessageRequestParams.URI);
     ipAddress          = JObjectUtil.getString(request, MessageRequestParams.IP_ADDR);
     userId             = JObjectUtil.getString(request, MessageRequestParams.USER_ID);
     companyId          = JObjectUtil.getString(request, MessageRequestParams.COMPANY_ID);
     requestHeaders     = JObjectUtil.getString(request, MessageRequestParams.HEADERS);
     requestBody        = JObjectUtil.getString(request, MessageRequestParams.BODY);
     metadata           = JObjectUtil.getObjectDict(request, MessageRequestParams.METADATA);
     contextRequestUser = JObjectUtil.getStringDefaultVal(request, MessageRequestParams.CONTEXT_USER, null);
 }
Esempio n. 3
0
 public static Boolean containsKeyWithNonEmptyString(JObject j, String key)
 {
     return(j.ContainsKey(key) && !String.IsNullOrEmpty(JObjectUtil.getString(j, key)));
 }