How to evaluate 403 Forbidden?

Discussion in 'iPhone/iPad Programming' started by lawicko, Sep 4, 2008.

  1. macrumors member

    Joined:
    Jul 17, 2008
    #1
    Hi,
    I'm using UIWebView in my application, and I would like to learn how can I evaluate 403 Forbidden error. I know it is possible, because native Safari can do this (you can see 403 Forbidden title when this happens). Unfortunately, I couldn't find any clues in UIWebView class documentation. I know that there is a method called webView:didFailLoadWithError: but it evaluates different kind of errors i.e. no connection and so on. If I got 403 error in my app the page is loaded sucessfully showing "Forbidden... bla bla bla" and nothing happens.

    Thanks for any clues.
     
  2. macrumors 6502a

    DipDog3

    Joined:
    Sep 20, 2002
    #2
    I don't understand. What are you looking to do if given a 403 error?
     
  3. macrumors regular

    Joined:
    Mar 13, 2008
    #3
    did you tried receiving your data into a NSURLResponse / NSURLHTTPResponse? although if youre looking to capture the 403 for authentication purposes, there may be better ways of doing that. there's an article on the iphone ADC called "URL loading system", with pretty good recipes, maybe you can find what you're looking in there.
     
  4. thread starter macrumors member

    Joined:
    Jul 17, 2008
    #4
    Thanks! This is exactly what I was looking for :)
     

Share This Page