These are chat archives for canjs/canjs

1st
Mar 2018
Viktor Busko
@Lighttree
Mar 01 2018 09:04

https://gitter.im/canjs/canjs?at=5a96b77f0202dc012e96818d

Maybe there is way to expose params to connect configuration ?
https://github.com/canjs/can-connect/blob/master/data/url/url.js#L373

In this case we can configure what ajax params URLBehavior will use. So the idea that we will be able to do something like...

Entity.connection = connect(
    [url, constructor, constructorStore, canMap, realTime, callbacksOnce], {
        url: '/secured/entity',
        ajaxConf: {
                // configuration params  like beforeSend etc..
                // that will allow us do some additional logic if required
        },
        Map: Entity,
        List: Entity.List,
        algebra
    }
);
AntonProkofyev
@AntonProkofyev
Mar 01 2018 11:07
Hi folks, i'm using url behavior and find interesting code there
https://github.com/canjs/can-connect/blob/master/data/url/url.js#L363
why the decision to modify object which we try to send to the server was made
why not just copy without removing
AntonProkofyev
@AntonProkofyev
Mar 01 2018 11:12
why it's not configurable at least
Justin Meyer
@justinbmeyer
Mar 01 2018 16:09
@Lighttree you could probably build some hooks like that yourself, but they aren't built in now
@AntonProkofyev it's modifying the object where?
@/all I'm going to walk through building a rich text editor on a live stream today: https://www.youtube.com/watch?v=EpG1Wzn5by8
Mohamed Cherif Bouchelaghem
@cherifGsoul
Mar 01 2018 22:38
@justinbmeyer I was not in front of my computer :/