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
Johnlin
May 08, 2018
Programming
89
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
270
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
350
Ruby 型別檢查工具簡介
johnlinvc
0
580
Swift Actor 實作探索
johnlinvc
0
200
用 mruby 來寫跨平台工具
johnlinvc
0
120
Actor model 簡介
johnlinvc
0
230
一起玩 Helm 3
johnlinvc
1
150
為什麼 App 卡卡的
johnlinvc
2
1.3k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
250
Other Decks in Programming
See All in Programming
継続的な負荷検証を目指して
pyama86
3
1.2k
要はバランスからの卒業 #yumemi_grow
kajitack
0
170
空間オーディオの活用
objectiveaudio
0
150
20260514_its_the_context_window_stupid.pdf
heita
0
1k
AI時代だからこそ「Bloc」を採用する価値があるのかもしれない
takuroabe
0
180
Programming with a DJ Controller — not vibe coding
m_seki
3
860
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
780
ハーネスエンジニアリングとは?
kinopeee
13
7k
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
520
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
360
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
3.2k
なぜあなたのコードには「コシ」がないのか?〜AI時代に問う、最後まで美味しい設計と戦略〜 #phpconkagawa / phpconkagawa2026
shogogg
0
210
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
370
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Accessibility Awareness
sabderemane
1
120
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
150
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
220
Designing for Timeless Needs
cassininazir
1
220
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
410
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
GitHub's CSS Performance
jonrohan
1033
470k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
310
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