postInstances Method

Post multiple strongly typed instances. Sends a request body with WSG instances.

postInstances<T extends WsgInstance<T>>(requestContext: AuthorizedClientRequestContext, typedConstructor: () => T, relativeUrlPath: string, instances: T[], requestOptions?: WsgRequestOptions, httpRequestOptions?: HttpRequestOptions): Promise<T[]>

Parameter Type Description
requestContext AuthorizedClientRequestContext The client request context
typedConstructor () => T Used to construct the resulting instances from the response.
relativeUrlPath string Relative path to the REST resource.
instances T[] Strongly typed instances to be posted.
requestOptions WsgRequestOptions WSG options for the request.
httpRequestOptions HttpRequestOptions Additional options for the HTTP request.

Returns - Promise<T[]>

The posted instances that's returned back from the server.

Defined in

Last Updated: 12 June, 2024