formatting request and response body