better way to send json requests