How can I get uniqid when I get data with Talend Web API?
Way of thinking: ・ Uniqid is saved as a cookie -Talend confirms that there is no component that acquires cookies. -Create a java component that acquires cookies by hand.
image:
java source:
//変数を定義する
String strPonit ="{"uniqid":"";
String domainurl = "xxxxxxxxxxxxxxxxxxxxxx";
String content_type = "application/x-www-form-urlencoded";
String apikey = "xxxxxxxxxxxxxxxxxxxxxx";
String login_id ="xxxxxxxxxxxxxxxxxxxxxx";
String login_password ="xxxxxxxxxxxxxxxxxxxxxx";
String udid ="xxxxxxxxxxxxxxxxxxxxxx";
context.put("udid",udid);
//画面請求のパラメータ
apikey =String.format(apikey, login_id, login_password,udid);
java.net.URL url = new java.net.URL(domainurl);
java.net.HttpURLConnection conn = (java.net.HttpURLConnection)url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", content_type);
conn.setDoOutput(true);
DataOutputStream out = new DataOutputStream(conn.getOutputStream());
out.writeBytes(apikey);
out.flush();
out.close();
java.util.Map<String, List
image:
HTTP body: "action=list&table=products_class&limit=50000000&offset=0&udid="+(String)context.get("udid")+"&uniqid="+(String)context.get("uniqid")
Note: Jobs are updated to personal GIT (private)
that's all