You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
2.1 KiB
86 lines
2.1 KiB
#include "HTTPRequest.hpp"
|
|
#include "epm_handler_common.h"
|
|
#include <tc\tc_macros.h>
|
|
#include <tc\emh.h>
|
|
#include <tc\preferences.h>
|
|
#include <property\propdesc.h>
|
|
#include <epm\epm.h>
|
|
#include <epm\epm_toolkit_tc_utils.h>
|
|
#include <tccore\item.h>
|
|
#include <tccore\grmtype.h>
|
|
#include <tccore\grm.h>
|
|
#include <tccore\imantype.h>
|
|
#include <sa\am.h>
|
|
#include <sa\sa.h>
|
|
#include <tccore\aom.h>
|
|
#include <tccore\aom_prop.h>
|
|
#include <property\prop_errors.h>
|
|
#include <tccore\workspaceobject.h>
|
|
#include <qry\qry.h>
|
|
#include <bom\bom_attr.h>
|
|
#include <bom\bom.h>
|
|
#include <epm\signoff.h>
|
|
#include <pom\pom\pom.h>
|
|
#include <pom\pom\pom_errors.h>
|
|
#include <fclasses\tc_date.h>
|
|
#include <epm\cr.h>
|
|
#include <cfm\cfm.h>
|
|
#include <sa\am.h>
|
|
#include "tc/envelope.h"
|
|
#include <stdio.h>
|
|
#include "ae/dataset.h"
|
|
#include <ctype.h>
|
|
#include <string.h>
|
|
#include <string>
|
|
#include <iostream>
|
|
#include <iterator>
|
|
#include <map>
|
|
#include <vector>
|
|
#include "ce/ce.h"
|
|
#include <time.h>
|
|
#include <windows.h>
|
|
#include <iostream>
|
|
#include <sql.h>
|
|
#include <sqlext.h>
|
|
#include "string"
|
|
#include "sstream"
|
|
#include <sa/tcfile.h>
|
|
#include <tccore/aom.h>
|
|
#include <sa/tcfile_cache.h>
|
|
#include <form/form.h>
|
|
#include "ctime"
|
|
#include "tchar.h"
|
|
#include <iostream>
|
|
#include <string>
|
|
#include <fstream>
|
|
#include <boost/thread/thread.hpp>
|
|
|
|
using namespace std;
|
|
|
|
void sendRequest(char *uid) {
|
|
try {
|
|
char *pref_values;
|
|
PREF_ask_char_value("jd2_server_ip", 0, &pref_values);
|
|
if (strlen(pref_values) != 0) {
|
|
stringstream ss;
|
|
ss << "http://";
|
|
ss << pref_values;
|
|
ss << ":8888/api/batchJob?uid=";
|
|
ss << uid;
|
|
printf("request url====>%s\n", ss.str().c_str());
|
|
http::Request request(ss.str().c_str());
|
|
const http::Response response = request.send("GET");
|
|
std::cout << std::string(response.body.begin(), response.body.end()) << '\n'; // print the result
|
|
}
|
|
} catch (const std::exception& e) {
|
|
std::cerr << "Request failed, error: " << e.what() << '\n';
|
|
}
|
|
}
|
|
|
|
int jd_batch_process(EPM_action_message_t msg) {
|
|
char *uid;
|
|
ITK__convert_tag_to_uid(msg.task, &uid);
|
|
printf("delete job_uid======>%s\n", uid);
|
|
sendRequest(uid);
|
|
return 0;
|
|
} |