title: How to get server response code for each request in WebView
body: <p>I have authorization logic managed via WebView:</p>
  
  <ul>
  <li>user click on login button in app</li>
  <li>I open WebView with loading login webpage (opened by url address)</li>
  <li>user provide their login and password > click on login button on page</li>
  <li>next page is opened in WebView - authorize access confirmation page</li>
  <li>user has to click on authorize access button on webpage</li>
  <li>after this redirect_uri URL will be tried to be opened in WebView</li>
  <li>I catch this redirect_uri in request and close WebView</li>
  </ul>
  
  <p>I inspect all requests (in order to catch redirect_uri) in WebView delegate method <code>shouldStartLoadWithRequest:</code>.</p>
  
  <p>Question: how can I manage server response for each request for page opened in WebView? </p>
  
  <p>The point is that we have some problems with auth server and time to time it shows error pages. So I want to catch such pages and close WebView for such cases.</p>