Just posting the 2 solutions I found below:
In the nginx.conf, add keepalive_timeout as 0s under the http context. This will close the connection on each request and the connections wont be pooled. Refer https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout. Its basically the number of seconds your connection will be kept alive once the response is sent back to the client
Pros: Change only in one place. Configuration is not controlled by the client
Cons: Not the recommended approach since it consumes resources as connections are not pooled.
In the client request, send a header with key as 'Connection' and value as 'close'. This will also trigger the same behaviour as above
Pros: Only one client will be requesting such configuration and other clients wont be affected and connection pooling can still be done for other clients
Cons: Client has more control
Testing above changes