-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathpostman.gui.txt
107 lines (90 loc) · 5.59 KB
/
postman.gui.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
┏━━━━━━━━━━━━━┓
┃ POSTMAN ┃
┗━━━━━━━━━━━━━┛
VERSION ==> #5.5.0
##Pro features
###Entreprise features
FEATURES ==> # - platforms: desktop, web, CLI
# - HTTP:
# - body: multipart/form-data, x-www-form-urlencoded, binary, text, JSON, JavaScript,
# XML, HTML
# - authorization: Bearer, Basic, Digest, OAuth 1/2, Hawk, AWS
# - cookies
# - timeout
# - gzip|deflate in response body
# - Cache-Control: no-cache [C]
# - requests [sub-]groups ("collection|folders"):
# - can be run all at once
# - workflows (using pm.setNextRequest())
# - variables:
# - can be:
# - "globals"
# - collection-wide
# - local ("environment")
# - variables (set in JavaScript)
# - iteration data (file containing different data for each iteration)
# - all accessed via {{VAR}} in URL|headers|body
# - can also use {{$guid}} {{$timestamp}} and {{$randomInt}}
# - preset headers
# - sharing:
# - via HTML/Markdown button
# - web page
## - team sharing
# - device sync
# - history
# - auto-completion
# - global search
# - proxy
# - REST API: collections|requests, environments, mocks, monitors, users
## - Integrations, including syncing collections to GitHub
### - SSO
#Other features where it's probably better to use actual tool doing this:
# - testing:
## - mock requests
# - JavaScript hooks: pre-request, post-response (test)
# - documentation:
# - collection|request|headers description
# - request examples
# - Markdown
## - API documentation generation
# - generate request snippet in many languages
# - API network (documentation marketplace)
## - status ("monitors")
## - failure email notifications
## - can be run from different regions
┌────────────────┐
│ JAVASCRIPT │
└────────────────┘
require(...) #Can require: atob, btoa, chai, cheerio, crypto-js, csv-parse/lib/sync, lodash, moment,
#tv4, uuid, xml2js, many core Node.js Module
#Can also require postman-collection (client for Postman REST API and utilities)
pm.info.eventName #'prerequest' or 'test'
pm.info.iteration[Count] #NUM (when running requests iteratively)
pm.info.requestName|requestId #STR
pm.request.url #URL
pm.request.headers #
pm.response.code #NUM
pm.response.reason()->STR #
pm.response.headers #
pm.response.responseTime #NUM
pm.response.text|json()->VAL #
pm.globals|environment|variables|
iterationData|cookies.* #All have same methods
pm.globals.get('VAR')->VAL
pm.globals.set('VAR', VAL)
pm.globals.has('VAR')->BOOL
pm.globals.unset('VAR')
pm.globals.clear()
pm.globals.toObject()->OBJ #
data.* #Same as pm.iterationData.*
pm.setNextRequest('Request NUM') #During a collection run, jumps to another request
pm.sendRequest #Seend HTTP request
('URI'|OPTS, FUNC(ERROR, RESP)) #OPTS: url STR|URL, method STR, header 'VAR:VAL\n...', body, auth, proxy, certificate
#RESP: like pm.response
pm.test(STR, FUNC())
pm.expect(...) #Uses chai
┌────────────┐
│ RUNMAN │
└────────────┘
runman #CLI runner for collections.
#Not documented here because mostly useful when using Postman for testing.