Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do I use it in SPFx react #5

Open
Ofer-Gal opened this issue May 9, 2020 · 1 comment
Open

how do I use it in SPFx react #5

Ofer-Gal opened this issue May 9, 2020 · 1 comment

Comments

@Ofer-Gal
Copy link

Ofer-Gal commented May 9, 2020

I tried to import just BatchUtils but it does not work. So I change it to "export const BatchUtils = (() => { ..." and it worked
The tslinter insisted on having something for "FormDigestValue" even though you don't need it for GET
So now 2 URLs that work fine in arr bring back an empty result with no error.
BatchUtils.GetBatchAll({ rootUrl: window.location.origin, batchUrls: arr, FormDigestValue: null })

Any idea how to fix?

@anomepani
Copy link
Owner

@Ofer-Gal , you are right need to use export const If you need to import with spfx react.

FormDigestValue not required for GET Request but batch API is post request so
FormDigestValue value will be use but if you do not pass digest it will internally generate digest based on given parameter.

Could you please attach request and payload and response from network tab, it is helpful for troubleshoot issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants