This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
target 'YouProjectName' do | |
use_frameworks! | |
# Pods | |
pod 'Alamofire-Synchronous', '~> 4.0' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pod init | |
# pod install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "PublicReadGetObject", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::backgets-name-s3/*" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
files: | |
"/etc/httpd/conf.d/hello.conf": | |
mode: "000644" | |
owner: root | |
group: root | |
content: | | |
<VirtualHost *:80> | |
DocumentRoot /var/app/current | |
<Directory /var/app/current/> | |
Options Indexes FollowSymLinks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
option_settings: | |
aws:elasticbeanstalk:application:environment: | |
AUTH_KEY: 'test' | |
SECURE_AUTH_KEY: 'test' | |
LOGGED_IN_KEY: 'test' | |
NONCE_KEY: 'test' | |
AUTH_SALT: 'test' | |
SECURE_AUTH_SALT: 'test' | |
NONCE_SALT: 'test' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ตัวอย่างการทำงานของ Task | |
var ID:string = nil | |
func getDataFromURL() { | |
let URL:string = "https://xxx...." | |
Alamofire.request(URL, method: .get, parameters: nil).responseJSON { response in | |
let dataJSON = JSON(response.result.value!) | |
if let id:String = dataJSON["data"]["id"].string { | |
self.ID = id | |
} |