program wtsODataTester;
{$APPTYPE CONSOLE}
uses
  SysUtils,
  SynCrtSock,
  SynZip,
  utf8;

var
   req:TWinHTTP;
   out_header,out_data:String;
var
   rcode:Integer;
begin
  req := TWinHTTP.Create('millennium.iwise.com.br','888',false);
  try
      req.RegisterCompress(SynZip.CompressDeflate);
      req.UserName := 'millennium-app\odata';
      req.Password := '0d@t@123';
      rcode := req.Request('/api/millenium_eco/produtos/listavitrine?vitrine=9','GET',2000,'',
                           UTF8Encode(''){aqui vão os parametros em JSON quando for por POST},
                           'content-type:application/json',
                           out_header,out_data);
  finally
  req.Free;
  end;

  Write('response('+IntToStr(rcode)+'):'+UTF8ToString(out_data));
  ReadLn;

end.