Following the AFNetworking library to write this for my study purpose