replace AFNetworking deprecated methods.