| | |
| | | protected static Logger logger; |
| | | public static int ConnectTimeout = 60; |
| | | public static int WriteTimeout = 60; |
| | | public static int ReadTimeout = 60; |
| | | public static int ReadTimeout = 600; |
| | | |
| | | protected HttpServerMeta meta; |
| | | private static OkHttpClient httpClient = null; |
| | |
| | | |
| | | public IRequest buildBody(IRequest request, WorkStep step, ICall iCall) throws Exception { |
| | | DataPackage dataPackage = step.getDataPackage(); |
| | | dataPackage.loadOneDataFromDB(true); |
| | | MapList<String, Template> templateList = iCall.getRequestTemplateList(); |
| | | Entity master = dataPackage.getMasterEntity(iCall.getRequestDataSources()); |
| | | |
| | |
| | | for (Entry<String, Template> entry : templateList.getItemMap().entrySet()) { |
| | | Template template = entry.getValue(); |
| | | String key = entry.getKey(); |
| | | |
| | | String value = template.fillVariants(dataPackage); |
| | | System.out.println("value:" + value); |
| | | if ("jsonbody".equals(key)) { |
| | | request.setJSONBody(value); |
| | | } |
| | |
| | | else { |
| | | request.addFormData(entry.getKey(), value); |
| | | } |
| | | |
| | | logger.info("key :{}, value:{}", key, value); |
| | | } |
| | | |
| | | if (master != null) { |