GithubHelp home page GithubHelp logo

Comments (4)

s-KaiNet avatar s-KaiNet commented on June 13, 2024

Hi Andrew, thank you very much!

For your question I think you can use promise.all (bluebird) or something
similar, since all requests in the module are promise-aware.

On Sep 17, 2016 14:30, "Andrew Koltyakov" [email protected] wrote:

Hi Sergei,

First of all, thank you for this great library, it found a place in our
projects and do its job nicely!

Question: Do you have a clue, how to add batch queries support to
sp-request library?
To be able to combine the reasonable set of REST queries to one single
batch and then send a network query all at once. With some sort of syntax:

...var spr = require("sp-request").create(ctx, env);var batch = spr.createBatch();var batchResults = [];spr.getInBatch(restUrl1, batch).then(...);spr.getInBatch(restUrl2, batch).then(...);spr.postInBatch(restUrl2, batch, {
body: { ... },
headers: { ... }
}).then(...);...batch.execute().then(function() {
console.log("All is done!", batchResults);
});


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#2, or mute the thread
https://github.com/notifications/unsubscribe-auth/AKKh5Mjot9uDajYb85SF8MykMryeeYkoks5qq89WgaJpZM4J_k1V
.

from sp-request.

koltyakov avatar koltyakov commented on June 13, 2024

It's not about getting event then all responses are returned, but merging requests in one physical call, which can improve performance in some scenarios, especially in SPO.

Thanks for idea of Bluebird's promise.all this will be definitely cool for SP2013 communication logic.

from sp-request.

s-KaiNet avatar s-KaiNet commented on June 13, 2024

Now I see... you are about $batch support in odata. I'd rather say I don't
have plans to include that, because the main purpose of this library is to
provide authentication and that's it. For example in request module you
don't have an option to construct batch, so sp-request also doesn't support
this. You need to implement it on your own.

On Sep 18, 2016 11:34, "Andrew Koltyakov" [email protected] wrote:

It's not about getting event then all responses are returned, but merging
requests in one physical call, which can improve performance in some
scenarios, especially in SPO.

Thanks for idea of Bluebird's promise.all this will be definitely cool for
SP2013 communication logic.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKKh5DBAlsOCx_pACowLVDYNO_t0Orqnks5qrPeOgaJpZM4J_k1V
.

from sp-request.

koltyakov avatar koltyakov commented on June 13, 2024

Ok, got it. Thank you for the info.

from sp-request.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.