set

open override fun set(entity: TEntity): TEntity?

Sets/replaces the entity.

Return

The entity as returned by the server, possibly with additional fields set. null if the server does not respond with a result entity.

Parameters

entity

The new entity.

Throws

when the entity has changed since it was last retrieved with read. Your changes were rejected to prevent a lost update.

when the server responds with HttpStatusCode.BadRequest.

when the server responds with HttpStatusCode.Forbidden.

for other non-success status codes.