public static void APICaller_POST_Auth(SqlString URL, SqlString Authorization, SqlString JsonBody) { try { string Result = APIConsumer.POSTMethod(URL.ToString(), JsonBody.ToString(), Authorization.ToString()); Helper.SendResultValue("Result", Result); } catch (Exception ex) { Helper.SendResultValue("Error", ex.Message.ToString()); } }
public static SqlInt32 APICaller_POST(SqlString URL, SqlString JsonBody) { SqlInt32 ExecutionResult = APIConsumer.DEFAULT_EXECUTION_RESULT; try { string Result = APIConsumer.POSTMethod(URL.ToString(), JsonBody.ToString()); Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_RESULT, Result); } catch (Exception ex) { Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_ERROR, ex.Message.ToString()); ExecutionResult = APIConsumer.FAILED_EXECUTION_RESULT; } return(ExecutionResult); }