Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-17518

CurlHttpRequest requires second param on CentOS

XMLWordPrintable

    • Sprint 62 (Mar 2020)
    • 0.125

      Steps to reproduce:

      1. Create webhook with the following code:
        var response,
            request = new CurlHttpRequest(),
            url = 'https://postman-echo.com/get';
         
        request.AddHeader('Custom-header: 12345');
        response = request.Get(url);
        
        return response;
      2. Execute test from Frontend.
      3. Observe that webhook returns '1'
      4. Change webhook code to the following:
        var response,
            request = new CurlHttpRequest(),
            url = 'https://postman-echo.com/get';
         
        request.AddHeader('Custom-header: 12345');
        response = request.Get(url, '');
        
        return response;
      5. Observe that webhook returns expected result:
        var response,{
            "args": {},
            "headers": {
                "x-forwarded-proto": "https",
                "host": "postman-echo.com",
                "accept": "*\/*",
                "content-type": "application\/x-www-form-urlencoded",
                "custom-header": "12345",
                "x-forwarded-port": "443"
            },
            "url": "https:\/\/postman-echo.com\/get"
        }

      Expected:
      It is expected for HTTP requests to not have required empty data field.

            vso Vladislavs Sokurenko
            vjaceslavs Vjaceslavs Bogdanovs
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: