adds encoding to client_spec