Test server

Cherry pick

On Fri, Jun 13, 2014 at 3:42 PM, Merlin Nimier-David
<notifications@github.com> wrote:

>> +  var config = apiDescriptors[name];
>> +  extendDefaults(config, defaultDescriptor);
>> +  var verb = (config.verb === 'DELETE' ? 'del' : config.verb.toLowerCase());
>> +
>> +  if(config.requireId) {
>> +    config.endpoint = config.endpoint.replace('{id}', ':id');
>> +  }
>> +  if(config.requireIdentifier) {
>> +    config.endpoint = config.endpoint.replace('{identifier}', ':id');
>> +  }
>> +
>> +  server[verb](config.endpoint, function(req, res, next) {
>> +    // if (invalid request)
>> +    //   next(new restify.error))
>> +
>> +    var filename = verb + '-' + config.endpoint.replace('/', '');
> The helper's not merged yet, it's in pull request #20. What's good practice on that?
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/AnyFetch/anyfetch.js/pull/19/files#r13750367