2
我正尝试使用位于https://www.mashape.com/ultimate/currency-convert#的mashape的货币转换器API!UNIREST objective c货币转换器Api
我是新来的objective-c。我想通过这个代码调用API -
NSDictionary* headers = @{@"X-Mashape-Authorization": @"key"};
NSDictionary* parameters = @{@"amt": @"2", @"from": @"USD", @"to": @"INR", @"accuracy": @"2"};
UNIHTTPJsonResponse* response = [[UNIRest post:^(UNISimpleRequest* request) {
[request setUrl:@"https://exchange.p.mashape.com/exchange/?amt=120&from=usd&to=gbp&accuracy=3&format=json"];
[request setHeaders:headers];
[request setParameters:parameters];
}] asJson];
有人能告诉我怎样才能访问返回的信息,以及如何参数2发送的数量,而不是字符串。
感谢您的帮助。