Http Example 1

execute ibeblock     
as
begin
  url   = 'URL=https://www.ibexpert.net/ibe/';
  sess  = ibec_http_OpenSession(:url);

-- ibec_http_SetHeader(:sess,'Authorization: token xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
 ibec_http_SetHeader(:sess,'Content-Type: application/json');

-- ibec_http_Post(:sess,ibec_AnsiStringToUTF8('{"filter": {"sgtin" : "0460190700319210E04K5C22T9C"},"start_from": 0,"count": 1}'));
  scode = ibec_http_StatusCode(:sess);
  sdesc = ibec_http_Data(:sess);
  lHeaders = ibec_http_GetProperty(:sess, 'LastSentHeaders');
  if (ibec_http_GetHeader(:sess)) then
    --ibec_ShowMessage(:scode||'  '||:sdesc);
    ibec_ShowMessage('Response: '||:scode||'  '||ibec_UTF8ToAnsiString(:sdesc));
  else
    ibec_ShowMessage('Error '||:scode||'  '||:sdesc);

  ibec_http_CloseSession(:sess);

end