public RESTError(int statusCode, string message, string stackTrace, string endpoint, Endpoint.EndpointType type, Dictionary <String, object> parameters) { StatusCode = statusCode; RestMessage = message; RestStackTrace = stackTrace; URL = endpoint; EndpointType = type; Parameters = parameters; Exception = null; }
public RESTError(int statusCode, JToken token, string endpoint, Endpoint.EndpointType type, Dictionary <String, object> parameters) { StatusCode = statusCode; RestMessage = (string)token["message"]; RestStackTrace = (string)token["StackTrace"]; URL = endpoint; EndpointType = type; Parameters = parameters; Exception = null; }
public RESTError(string message) { StatusCode = 0; RestMessage = message; RestStackTrace = null; URL = null; EndpointType = Endpoint.EndpointType.Fake; Parameters = null; Exception = null; }
public RESTError(WebException e) { StatusCode = 0; URL = null; RestMessage = e.Message; RestStackTrace = e.StackTrace; EndpointType = Endpoint.EndpointType.Fake; Parameters = null; Exception = null; System.Diagnostics.Debug.WriteLine(Message); }
public RESTError(string endpoint, Endpoint.EndpointType type, Dictionary <String, object> parameters, Exception exception) { if (exception != null) { RestMessage = exception.Message; RestStackTrace = exception.StackTrace; } StatusCode = 0; URL = endpoint; EndpointType = type; Parameters = parameters; Exception = exception; }
public Endpoint GetEndpointByName(string name) { Endpoint.EndpointType serviceType = Endpoint.EndpointType.Fake; switch (name.ToLower()) { case "user": case "oauth/token": serviceType = Endpoint.EndpointType.Post; break; case "updateuser": serviceType = Endpoint.EndpointType.Put; break; } return(new Endpoint(0, Endpoint.BaseURL, serviceType)); }
public Endpoint GetEndpointByName(string name) { Endpoint.EndpointType serviceType = Endpoint.EndpointType.Fake; switch (name.ToLower()) { case "user": case "oauth/token": serviceType = Endpoint.EndpointType.Post; break; case "updateuser": serviceType = Endpoint.EndpointType.Put; break; } return(new Endpoint(0, NotSensitive.SystemUrls.base_url, serviceType)); }