课程: AWS API Gateway with HTTP, Lambda, DynamoDB, and iOS
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
GET Request from iOS - Amazon Web Services (AWS)教程
课程: AWS API Gateway with HTTP, Lambda, DynamoDB, and iOS
GET Request from iOS
- [Instructor] Okay, so now I want to exercise this API from a client, from a consumer. I am going to use an iOS project in Xcode. If you're using something else, it's going to be somewhat similar. The concept is going to be similar as far as everything from the data you send up and beyond that, the API, the Lambda and so forth. So here I am in a iOS app template app, it's just the basic template code that starts up when you create an empty iOS app. And I've provided some code in an exercise file called 05_03, and this is going to walk us through fetching an item from the API. I'm going to put it in the same file, typically I would put it in another file, but just for ease, I'm going to put it right here so we can see it all at once. So I have this user note that is the struct, it will represent the note as it is stored in the app. It's Codable, so I can parse it to and from JSON. And I've got two properties, the ID and the text. Notice the ID is named differently than in the API…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。