有没有办法可以为restkit提供虚拟输入? [英] Is there a way we can give dummy input to restkit?

查看:39
本文介绍了有没有办法可以为restkit提供虚拟输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 Restkit 还很陌生.我知道我平静的反应会如何.它尚未准备好从服务器端获取.有没有办法直接向 restkit 提供虚拟输入?我们可以将json文本文件作为NSUrlConnection的输入,类似这里怎么做?

I am pretty new to the Restkit. I know how my restful response will be. Its not ready yet to get from the server side. Is there a way to give dummy input directly to restkit ? We can give json text file as an input to NSUrlConnection, similarly how to do it here?

推荐答案

如何运行一个简单的 Web 服务器,它会以 JSON 格式返回您想要的任何输出?例如,当我需要对将使用 RestKit 的应用程序进行原型设计时,我使用 sinatra Web 框架(几行代码)创建一个简单的 ruby​​ 应用程序并在本地启动它,然后将基于 RestKit 的应用程序指向 Web 应用程序(http://www.sinatrarb.com)

How about running a simple web server which will return any output you want in JSON format? For example, when I need to prototype an app which will use RestKit, I create a simple ruby app using sinatra web framework (few lines of code) and start it locally, and point my RestKit based app to web app (http://www.sinatrarb.com)

这篇关于有没有办法可以为restkit提供虚拟输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆