Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要以正文格式发布一些请求:
username=<(某个用户名)>&password=<(某个密码)>
并且响应字符串是 JSON 格式。
但是当我创建对象映射时,正文字符串是:
{"username":"<(一些用户名)>","password":<(一些密码)>}
有没有办法可以更改请求正文的格式?
谢谢!
我刚刚想通了:
RKObjectManager *manager = [RKObjectManager managerWithBaseURLString:[MyClass baseURL]]; RKObjectLoader *loader = [manager loaderWithResourcePath:[MyClass pathForLogin]]; [loader setHTTPBodyString:@"..."];