Pregunta de entrevista de Microsoft

Write a function to handle HTTP response. And, write some test case to test your function.