Could you also rewrite the code to handle status codes other than 200 as well?