Echo JS 0.11.0

<~>
victorquinn 3724 days ago. link 1 point
Very interesting, I wrote something very similar we have had in production for about a year now we called BatchRequest.

The docs: http://batch-request.socialradar.com
On Github: https://github.com/socialradar/batch-request
The Koa version: https://github.com/socialradar/koa-batch



A few differences I note off the bat:

* multifetch appears to take the list of requests to make in the url, BatchRequest takes them as a POST body JSON

* It seems multifetch only supports GET requests, BatchRequest can perform GET, POST, PUT, DELETE, PATCH

* BatchRequest has a dependency model so you can say perform request A then B and after B is done then C to ensure they run in order. It doesn't appear multifetch has this capability

* BatchRequest includes validation middleware to ensure the batch request itself is valid prior to firing it off

* multifetch seems to only support JSON, BatchRequest can handle requests of any format including no return at all or even XML *shudder*

* multifetch seems to make requests only to this server, BatchRequest could be used to make requests to external servers if desired (though using a whitelist model so as not to open a massive security hole of course)

Interestingly, their response bodies are almost identical. Also, entirely coincidental but they both are at version 0.1.1


Not meant as a one-upping kinda thing, just pointing out some differences. I'm glad someone else also noticed a need for something like this!

Replies