daily pastebin goal
7%
SHARE
TWEET

Untitled

a guest Dec 6th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static function testeWebService(Request $request, Response $response, array $args){
  2.                 $dados   = $request->getParsedBody();
  3.                 $objArray = array($dados['parm1'],$dados['parm1']);  
  4.  
  5.             try {
  6.  
  7.                 return WsResponse::send( $objArray);
  8.  
  9.             } catch (Exception $e) {
  10.  
  11.  
  12.  
  13.                 return WsResponse::send($e->getMessage());
  14.             }
  15.  
  16.     }
  17.    
  18. var data = {
  19.         companyId : getValue("WKCompany") + '',
  20.         serviceCode : 'teste',
  21.         endpoint : 'teste/webn/testeWebService',
  22.         method : 'post',
  23.         timeoutService : '180',
  24.         params : {
  25.             'parm1' : 'Teste01',
  26.             'parm2' :  'Teste02'
  27.         }
  28.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top