连接完成后返回
我有一个问题,(基本上与这个< /a> 仍未得到答复
我正在编写一些调用 JSON API 并接收响应的方法, 每个方法都会创建一个HTTPRequest,但是接收到的数据在方法中不可用,但在connectionDidFinishLoading中可用。
我现在如何使用这些数据? 我有不同的方法,每个方法都会收到其他内容,但我无法控制收到的数据,因为它位于connectionDidFinishLoading 内部。
即
登录(执行HTTPRequest)
getCustomerId(执行HTTPRequest)
getTextsforCustomer(执行HTTPRequest) ... ...
我想对登录/getCustomerId...方法中已有的 JSON 响应执行一些操作。
希望它是清楚的。
提前致谢。
德罗尔。
I have a question, (Basically same as this one which remained UN-answered
I'm writing some methods that call a JSON API, and receive a response,
each method will create an HTTPRequest, but the data received will not be available in the method, but will be available in connectionDidFinishLoading.
How can i use the data now?
I have different methods, each one receive something else, but i cannot control the data received because it's inside connectionDidFinishLoading.
i.e.
login (perform HTTPRequest)
getCustomerId (perform HTTPRequest)
getTextsforCustomer (perform HTTPRequest)
...
...
i want to do some actions with the JSON response already in the login/getCustomerId... methods.
Hope it's clear.
Thanks in advance.
Dror.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将这些值存储在某个地方怎么样?就像公共对象的实例变量一样?
How about storing those values somewhere. Like in instance variables of a common object?