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
Postmanを利用したAPI開発/postman-tutorial
Search
nishina
November 23, 2020
Programming
0
79
Postmanを利用したAPI開発/postman-tutorial
nishina
November 23, 2020
Tweet
Share
More Decks by nishina
See All by nishina
1週間で終わらせるはじめてのGo言語学習/beginner-study-go
nishina555
1
130
テキスト校正ツールtextlintの 紹介と導入方法/textlint-overview
nishina555
0
82
認証・認可の仕組みを理解する上で知っておきたい基礎知識/auth-overview
nishina555
1
220
REST APIとの比較でざっくり理解するGraphQL/graphql-introduction
nishina555
0
180
ウィンドウ操作に便利な ショートカットとアプリ紹介/mac-window-shortcut
nishina555
0
140
IPアドレス(IPv4)の仕組み/overview-of-ipaddress
nishina555
0
130
図で理解する自然言語処理/nlp_tutorial
nishina555
0
250
ToDoアプリで学ぶReact/Redux入門/vtecx2_lt2
nishina555
2
2.9k
DiveIntoOSSThroughHacktoberfest_SPMKT
nishina555
1
310
Other Decks in Programming
See All in Programming
PHPで書いたAPIをGoに書き換えてみた 〜パフォーマンス改善の可能性を探る実験レポート〜
koguuum
0
170
Being an ethical software engineer
xgouchet
PRO
0
210
Golangci-lint v2爆誕: 君たちはどうすべきか
logica0419
1
120
On-the-fly Suggestions of Rewriting Method Deprecations
ohbarye
1
2.6k
Enterprise Web App. Development (1): Build Tool Training Ver. 5
knakagawa
1
120
gen_statem - OTP's Unsung Hero
whatyouhide
1
210
リアルタイムレイトレーシング + ニューラルレンダリング簡単紹介 / Real-Time Ray Tracing & Neural Rendering: A Quick Introduction (2025)
shocker_0x15
1
310
SEAL - Dive into the sea of search engines - Symfony Live Berlin 2025
alexanderschranz
1
140
Chrome Extension Techniques from Hell
moznion
1
160
PHP で学ぶ OAuth 入門
azuki
1
200
The Implementations of Advanced LR Parser Algorithm
junk0612
1
320
ミリしらMCP勉強会
watany
4
770
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.8k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
Automating Front-end Workflow
addyosmani
1369
200k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.6k
Gamification - CAS2011
davidbonilla
81
5.2k
Six Lessons from altMBA
skipperchong
27
3.7k
Optimizing for Happiness
mojombo
377
70k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Git: the NoSQL Database
bkeepers
PRO
430
65k
Transcript
ਔՊ ढ़ PostmanΛར༻ͨ͠API։ൃ
࣍ • ࠓճ͢༰ • Postmanʹ͍ͭͯ • Postmanͷ۩ମతͳ͍ํ • ͓ͬͯ͘ͱศརͳTIPS
• ·ͱΊ
࣍ • ࠓճ͢༰ • Postmanʹ͍ͭͯ • Postmanͷ۩ମతͳ͍ํ • ͓ͬͯ͘ͱศརͳTIPS
• ·ͱΊ
• ʮAPI։ൃͬͯଞͷਓͲ͏͍ͬͯͬͯΔͷʁʯ • ʮAPI։ൃΛ͢Δ্Ͱඞཁʹͳͬͯ͘ΔφϨοδͱ͔͋Δʁʯ ͲͷΑ͏ʹAPI։ൃΛ͍ͯ͠Δ͔ڞ༗ API։ൃͰར༻͍ͯ͠ΔPostmanʹ͍ͭͯ͠Λ͠·͢ ͠ɺAPI։ൃΛ͢Δ্ͰศརͳπʔϧɾϊϋͳͲ͋Εڭ͑ ͯΒ͑Δͱ͏Ε͍͠Ͱ͢
࣍ • ࠓճ͢༰ • Postmanʹ͍ͭͯ • Postmanͷ۩ମతͳ͍ํ • ͓ͬͯ͘ͱศརͳTIPS
• ·ͱΊ
• ࠨ্͔ΒAPIͷొ͕Ͱ͖Δ • ࠨαΠυόʔʹAPIͷҰཡ • APIͷ࣮ߦ݁Ռ͕ը໘தԝʹ දࣔ͞ΕΔ Postmanͷશମ૾ʹ͍ͭͯ
• Params • ύϥϝʔλʔ͖Ͱ ϦΫΤετૹΔͱ͖ʹར༻ • Authorization • ೝূ͕ඞཁͳAPIͷ࣌ʹར༻ •
Headers • Content-TypeɺAcceptΛ ࢦఆ͢Δͱ͖ʹར༻ • Body • JSONΛهड़͢Δͱ͜Ζ APIϦΫΤετͷৄࡉʹ͍ͭͯ
࣍ • ࠓճ͢༰ • Postmanʹ͍ͭͯ • Postmanͷ۩ମతͳ͍ํ • ͓ͬͯ͘ͱศརͳTIPS
• ·ͱΊ
1. HTTPϝιουͱ ΤϯυϙΠϯτΛࢦఆ͢Δ 2. ʰSendʱͰ࣮ߦ 3. APIͷϨεϙϯε͕දࣔ͞ΕΔ GETϝιουʢγϯϓϧͳϦΫΤετʣ
1. ParamsΛબ 2. Key, ValueΛηοτ͢Δͱ ΫΤϦύϥϝʔλͱͯ͠ Ճ͞ΕΔ GETϝιουʢύϥϝʔλ͖ͷϦΫΤετʣ
1. ʰBodyʱΛબ 2. ʰrawʱબ͠ɺJSONܗࣜΛ ࢦఆ͢Δͱɺ JSONͷϦΫΤετϘσΟ͕ ࡞Ͱ͖Δ 3. Headerkey, valueͰηοτ
Λ͢Δ POSTϝιουʢϘσΟɺϔομʔ͖ϦΫΤετʣ
1. ʰBodyʱΛબ 2. ʰform-dataʱΛࢦఆ͢Δͱɺ ը૾ΞοϓϩʔυͷΑ͏ͳ ϦΫΤετΛૹΔ͜ͱ͕Մೳ POSTϝιουʢϑΥʔϜΛར༻ͨ͠ϦΫΤετʣ
࣍ • ࠓճ͢༰ • Postmanʹ͍ͭͯ • Postmanͷ۩ମతͳ͍ํ • ͓ͬͯ͘ͱศརͳTIPS
• ·ͱΊ
Basicೝূ͕ඞཁͳڥʹରͯ͠APIଓ͢Δʹʁ ʰAuthorizationʱʹʰBasic Authʱͱ͍͏ೝূํ๏͕͋Γ·͢ɻ UsernameͱPasswordΛηοτ͢ΕBasicೝূΛύεͰ͖·͢ɻ
ڥ͝ͱʹϗετ໊ͳͲΛΓସ͑Δํ๏ʁ ӈ্ͷࣃंΞΠίϯ͔Βڥ͝ͱʹมΛఆٛͰ͖·͢ɻ ྫ͑ɺHOST_NAMEΛڥ͝ͱʹఆٛ͢Εɺ ʰ{{HOST_NAME}}/api/…ʱͷΑ͏ͳϦΫΤετ͕࣮ߦՄೳʹͳΓ·͢
ଞਓͷPostmanͷઃఆΛΠϯϙʔτ͢Δํ๏ʁ PostmanʹઃఆͷΤΫεϙʔτ/Πϯϙʔτػೳ͕͋ΔͷͰɺ ΤΫεϙʔτͯ͠ΒͬͨσʔλΛΠϯϙʔτ͢Εڥߏங͕ྃɻ
࣍ • ࠓճ͢༰ • Postmanʹ͍ͭͯ • Postmanͷ۩ମతͳ͍ํ • ͓ͬͯ͘ͱศརͳTIPS
• ·ͱΊ
• API։ൃΛ͢Δࡍʹར༻͍ͯ͠ΔPostmanͷհ • PostmanΛར༻͢Δ͜ͱͰೝূը૾ΞοϓϩʔυͳͲ ͷAPIϦΫΤετͷ࣮ߦ؆୯ʹͰ͖Δ • ΤΫεϙʔτɾΠϯϙʔτػೳΛར༻͢Δ͜ͱͰ ڥߏங؆୯ʹͰ͖Δ ·ͱΊ