forIndividualRequest

fun forIndividualRequest(methodForCreate: HttpCreateMethod, methodForUpdate: HttpUpdateMethod, squash: Boolean): UploadStrategy

Creates an UploadStrategy for sending individual requests for each change.

This strategy can either fetch all changes or only the earliest change for each resource, generate patches per resource or per change, and send individual HTTP requests for each change.

Note: PUT for update with squash set as false is not supported as that would require storing full resource for each change.

Return

An UploadStrategy configured for individual requests.

Parameters

methodForCreate

The HTTP method to use for creating new resources (PUT or POST).

methodForUpdate

The HTTP method to use for updating existing resources (PUT or PATCH).

squash

Whether to squash multiple changes to the same resource into a single update. If true, all changes for a resource are fetched and patches are generated per resource. If false, only the earliest change is fetched and patches are generated per change.