Our pure JavaScript Scheduler component


Post by stan92 »

Hi,
I've the same issue (viewtopic.php?f=52&t=11759&p=62694&hilit=bearer#p62694)
.....
import {Grid, EventStore, EventModel, AjaxStore,CrudManager} from 'bryntum-scheduler/scheduler.umd.js';
...
        const a = new CrudManager(
            {
                autoLoad: true,
                transport: {
                    load: {
                        requestConfig: {
                            url: `${environment.apiUrl}api/v1/entities`,
                            method: "GET",
                            disableCaching: false,
                            params: {},
                            headers: {
                                authorization: myBearer_Token
                            }
                        }
                    },
                },
                listeners: {}
            }
        );

My token is not sent with the headers.

Fyi, I use Angular 8.

Any help?

Post by Maxim Gorkovsky »

Hello.
Cannot reproduce on latest release. Which scheduler version do you use?
transport : {
    load : {
        requestConfig : {
            url            : 'data/data.json',
            method         : 'GET',
            disableCaching : false,
            params         : {},
            headers        : {
                auth : 'bar',
                authorization : undefined
            }
        }
    }
}
tmp.jpg
tmp.jpg (39.18 KiB) Viewed 864 times

Post by stan92 »

My current version is 2.3.0

Post by Maxim Gorkovsky »

How do you check request headers? Is this code executed? Are you sure you are inspecting correct request? What is the type of myBearer_token? Does it work if you try to add header of type string or number?

Post by stan92 »

Sorry, in fact it works.. I just get an error saying
CrudManager: load failed, please inspect the server response.
I think it's a matter of format response.

Post Reply