sp-http does not support Batches - index-internal"' has no exported member 'ISPHttpClientBatchCreationOptions'.
Category
- [x] Question
- [ ] Typo
- [ ] Bug
- [ ] Additional article idea
Want to use the Clientbatch functionality of Sp-http but in the latest version it is not exported in the index-internal
Looks like you are not using the --plus-beta flag.
When generating your SPFx solution via the Yeoman generator, you need to add the plus-beta flag since SPHttpClientBatch is currently in preview. Since SPFx 1.5, the preview packages have been removed from the default installation. To use these packages, you need to explicitly request them using this flag.
So, create a new solution and in the generator add the flag as:
yo @microsoft/sharepoint --plusbeta
After that, you can import them in your webpart as:
import { SPHttpClient, ISPHttpClientBatchOptions, ISPHttpClientBatchCreationOptions, ISPHttpClientBatchConfigurations, SPHttpClientResponse, SPHttpClientBatch } from '@microsoft/sp-http';
Clientbatch functionality will move away from beta status to production status with the 1.6 version coming soon. Until then @gautamdsheth's comment is 100% valid. Closing as answered.
@VesaJuvonen looks like this is excluded from 1.6 release right? Thanks!
Yes, it is only in plusbeta.
Hi All, Any update on the the ISPHttpClientBatchCreationOptions, SPHttpClientBatch release?
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues