Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
swift warm up NSURLQueryItem
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Johnlin
May 08, 2018
Programming
80
0
Share
swift warm up NSURLQueryItem
Johnlin
May 08, 2018
More Decks by Johnlin
See All by Johnlin
用 MLIR 實作 一個 Ruby IR (intermediate representation)
johnlinvc
0
250
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
340
Ruby 型別檢查工具簡介
johnlinvc
0
570
Swift Actor 實作探索
johnlinvc
0
190
用 mruby 來寫跨平台工具
johnlinvc
0
110
Actor model 簡介
johnlinvc
0
230
一起玩 Helm 3
johnlinvc
1
140
為什麼 App 卡卡的
johnlinvc
2
1.3k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
230
Other Decks in Programming
See All in Programming
Rethinking API Platform Filters
vinceamstoutz
0
5.1k
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.5k
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
3
2.7k
安いハードウェアでVulkan
fadis
1
870
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
270
Strategy for Finding a Problem for OSS: With Real Examples
kibitan
0
130
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
1
230
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
440
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
5.4k
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
250
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
290
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
770
Featured
See All Featured
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
110
Mind Mapping
helmedeiros
PRO
1
140
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Between Models and Reality
mayunak
3
250
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
200
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
210
Embracing the Ebb and Flow
colly
88
5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Transcript
Swift ఔࣜখ NSURLQueryItem John Lin
NSURLQueryItem • ද URL ཫ໘తҰ෦ • https://www.google.com/search? q=nsurlqueryitem&ie=utf-8&oe=utf-8&client=firefox -b-ab
URL • Uniform Resource Locator • ౷ҰࢿݯఆҐූ • ᅿ
URI • Uniform Resource Identifier • ౷Ұࢿݯඪࢽූ • መࡍ্զ၇༻తጯ֘ੋ URI
• ࡏ20028݄ɼRFC 3305ࢦग़ɼᦒવज़ޠʮURLʯနඃኍᔟ༻ԙ ৗ༻ޠ೭தɼୠଖຊቮزݷඃኑغɻଖݱࡏతޭ༻ɼᷮੋ࡞ҝ ሣԙࠣURIҼแؚछࢦࣔஶ࿏Մୡੑతڠఆࣕ࡞ҝҐᅿଘࡏ తఏ੧ࣕቮɻجԙURIత䱾ଟඪ४ɼྫࢿݯඳड़ᐽՍɼቮៃਗ਼ ુද໌ɼࢿݯඪࣝຊແधࢦग़௨աࡍ࿏֫ಘࢿݯ෭ຊతํ๏ɼ ຠແਢࢦग़ࢿݯੋ൱جԙ࿏ɻ
URL ߏ • ڠఆྨܕ:[//[ଘऔࢿݯधཁతጪᨽࢿ㘤@]ثҐᅿ [:ᥒ]][/ࢿݯڃUNIX䈕Ҋ࿏ኸ]䈕Ҋ໊[?Ұ⇧][#ย ஈID] • https://zh.wikipedia.org/wiki/ %E7%BB%9F%E4%B8%80%E8%B5%84%E6%BA %90%E5%AE%9A%E4%BD%8D%E7%AC%A6
NSURL -> URL • ༻ိṶଘҰݸ URL • ࡏ Swift ༗ఏڙ
URL ိऔᢜత NSURL • URL ੋ Struct, NSURL ੋ Class • 䈕Ҋੋ url
NSURL -> URL
NSURL -> URL
URLComponents • ՄҎ༻String ҃ URL ိ init, ՄҎኺ಄߹ • ՄҎճ
URL • ՄҎଘऔमվཫ໘తҰ෦ɼ૾ੋ host, port, path, query, queryItems
URLComponents
Alamofire • େՈ࠷ৗ༻త http client let urlString = "https://httpbin.org/post" Alamofire.request(urlString,
method: .post) let url = URL(string: urlString)! Alamofire.request(url, method: .post) let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: true)! Alamofire.request(urlComponents, method: .post)
Alamofire • URLConvertible • ཁੋ conform Ṝݸ protocol बೳᙛᅿ public
protocol URLConvertible { func asURL() throws -> URL }
݁ • ཁදࣔ url ब༻ URL • 䈕Ҋੋ url •
ᔒࣄෆཁࣗݾ߹ url
Q&A
፮ᐔػ • http://slot.miario.com/machines/150067