'use strict'
// const http = require('http');
// const restify = require('../');
const restifyClients = require('restify-clients');

const client = restifyClients.createJsonClient({
    url: 'http://localhost:8080',
    retry: false,
    requestTimeout: 2000,
});

client.get(
    '/',
    function(err, _, res) {
        if (err) {
            console.log('request errored')
        } else {
            console.log('request success')
        }
        setImmediate(() => {
            client.get(
                '/',
                function(err, _, res) {
                    if (err) {
                        console.log('request errored')
                    } else {
                        console.log('request success')
                    }
                }
            );
        })
    }
);

