AWS API网关,返回" null"作为回应

时间:2016-06-10 12:36:40

标签: ios cocoa-touch amazon-web-services amazon-cognito aws-api-gateway

在我提问之前,我试图通过谷歌找到解决方案,但没有得到答案,所以写在这里

I’ve followed all steps that describe in this link.

但是在使用

进行所有调用后,我得到(null)响应
AWSTask *task = [serviceClient myAPI : “Parameter”];

但是,当我尝试使用 - AccessKey, SecretKey, AWS Region, Service Name - parameters在邮递员中调用网址时,我得到了正确的答复。

(我的api密钥已停用)

编辑:

当我使用下面的代码时,我得到 (null) 响应。

AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1  identityPoolId:@"YourIdentityPoolId"];
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2 credentialsProvider:credentialsProvider];
[AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;

但是当使用下面的代码时, 空白/没有 响应。

AWSStaticCredentialsProvider *credentialsProvider = [[AWSStaticCredentialsProvider alloc] initWithAccessKey:@“KEY” secretKey:@“KEY”];
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2  credentialsProvider:credentialsProvider];
[AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;

有人会帮我解决我的问题吗?

0 个答案:

没有答案