Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Bloco de código
languagejs
themeEclipse
linenumberstrue
	try{
		var clientService = fluigAPI.getAuthorizeClientService();
		var data = {
			companyId : getValue("WKCompany") + '',
			serviceCode : 'bamboo',
			endpoint : '/api/public/2.0/users/create',
			method : 'post',// 'delete', 'patch', 'put', 'get'      
			timeoutService: '100', // segundos
			params : {
				login : 'authorize.client',
				email : '[email protected]',
				code : 'authorize.client',
				firstName : 'authorize',
				lastName : 'client',
				fullName : 'authorize client',
				password : '123',
				extData :{
					'addicional-data':'123456'
				}
			},
          options : {
             encoding : 'UTF-8',
			 mediaType: 'application/json'
          }
		}
		// OU 
		var data = {
			companyId : getValue("WKCompany") + '',
			serviceCode : 'google',
			endpoint : '/userinfo/v2/me',
			method : 'get',
			timeoutService: '100' // segundos
		}
		// OU
		var data = {                                                    
			companyId : getValue("WKCompany") + '',
			serviceCode : 'fluig-local-basic',                      
			endpoint : '/api/public/2.0/testauthorizeclient/put',   
			method : 'put', // 'delete', 'patch', 'post', 'get'                                         
			timeoutService: '100', // segundos
			params : {                                              
					teste : 'teste'                                     
			}                                                       
		}                                                           
		var vo = clientService.invoke(JSON.stringify(data));

		if(vo.getResult()== null || vo.getResult().isEmpty()){
			throw new Exception("Retorno está vazio"); 
		}else{
			log.info(vo.getResult());
		}
	} catch(err) {
		throw new Exception(err); 
	}
 

...