Order 25, rule 3 of Civil Procedure Rules: Costs
Upon request in writing by any defendant the registrar shall sign judgment for the costs of a suit which has been wholly discontinued, and any defendant may apply at the hearing for the costs of any part of the claim against him which has been withdrawn.
Check the current authoritative text and amendment history before relying on this provision.