Note that the Postman team only tests, fixes bugs, and provides support for the app on Mac, Windows, Linux, and the web.
The minimum OS version supported is macOS 10.11 (El Capitan).You may encounter a "Library not loaded" error if you attempt to unzip and install Postman using a third-party app—using the default Archive Utility for Mac should resolve this.
Postman supports Windows 7 and above. Bothia32 (x86)
andx64 (amd64)
installers are available for Windows. Windows for ARM devices is possible by using the ia32 binary.
snap install postman
.
opt
directory. You will need sudo
privileges.
Postman.desktop
and saving it in the following
location:
opt
if you extracted the file somewhere
else—and save it:
Postman supports the following distributions:
Ubuntu 14.04 and newer Fedora 24 Debian 8 and newerThe support of certain Linux distributions depends on if they are supported by Electron. Refer to Electron's documentation.It is recommended you install Snap as it includes all the libraries that the app needs and they are bundled with the app itself.Avoid starting Postman using thesudo
command, as it will create permission issues on the files created by Postman.Make sure you have read/write permission for the~/.config
folder where Postman stores information.If you are an Ubuntu 18 user, you will also need to install thelibgconf-2-4
package with the commandapt-get install libgconf-2-4
If you try to send a request and it isn't successful because the agent is not selected, you will see a link in the response area which you can select to switch to the agent and try your request again. Read more about the agent.
Origin
and User-Agent
. These are restricted in the
Chrome app.
Note that importing will overwrite your existing data. For more on bulk import, see Importing Postman data.
\*.getpostman.com
\*.postman.co
\*.pstmn.io
\*postman.com
Cannot update while running on
a read-only volume
/Application
directory for Mac, and
to the home
directory for
Linux.
Code signature at URL
file:///... did not pass
validation: code object is not
signed at all
pm
object provides most of the
functionality for testing your request
and response data, with the postman
object providing some additional
workflow control.
pm.*
, which provides access to request and
response data, and variables.
pm
object provides methods for accessing
global, collection, and environment
variables specifically, and pm.variables
methods for accessing variables at
different scopes as well as setting
local variables.
{{$variableName}}
:
For example:
score
in both the current collection and the
active environment, and you call pm.variables.get('score')
, Postman will return the current value
of the environment variable. When you
set a variable value using pm.variables.set
, the value is local and will only
persist for the current request or
collection run.
pm.environment
methods to access and manipulate
variables in the active (currently
selected) environment.
{{$variableName}}
:
For example:
pm.collectionVariables
methods to access and manipulate
variables in the collection.
{{$variableName}}
:
For example:
pm.globals
methods to access and manipulate
variables at global scope within the
workspace.
{{$variableName}}
:
For example:
pm.iterationData
methods to access and manipulate
variables from
data files during a collection
run.
pm.request
object provides access to the data for
the request the script is running
within. For a Pre-request Script
this is the request that is about to
run, and for a Test
script this is the request that has
already run.
pm.request
object pre-request scripts to alter
various parts of the request
configuration before it runs.
pm.request
object provides the following properties
and methods:
pm.response
object provides access to the data
returned in the response for the current
request in scripts added to the Tests.
pm.response
object provides the following properties
and methods:
pm.info
object provides data related to the
request and the script itself, including
name, ID, and iteration count.
pm.info
object provides the following properties
and methods:
pm.cookies
object provides access to the list of
cookies associated with the
request.
pm.cookies
object provides the following properties
and methods:
pm.cookies.jar
to specify a domain for access to
request cookies.
pm.sendRequest
method to send a request asynchronously
from a Pre-request
or Test
script. This allows you to execute logic
in the background if you are carrying
out computation or sending multiple
requests at the same time without
waiting for each to complete. You can
avoid blocking issues by adding a
callback function so that your code can
respond when Postman receives a
response. You can then carry out any
additional processing you need on the
response data.
pm.sendRequest
method a URL string, or can provide a
complete request configuration in JSON
including headers, method, body,
and more.
postman
object provides the setNextRequest
method for building request workflows
when you use the
collection runner
or
Newman.
Note thatsetNextRequest
has no effect when you run requests using the Send button, it only comes into effect when you run a collection.
postman.setNextRequest
to specify which request should run
next.
pm.info.requestId
):
layout
required
data
optional
options
optional
pm.getData
to retrieve response data inside a
visualization template string.
error
data
pm.test(testName:String,
specFunction:Function):Function
pm.test
to write test specifications inside
either the Pre-request
or Tests
scripts. Tests include a name and
assertion—Postman will output test
results as part of the response.
pm.test
method returns the pm
object, making the call chainable. The
following sample test checks that a
response is valid to proceed.
done
callback can be passed to pm.test
, to test asynchronous functions.
pm.expect
method allows you to write assertions on
your response data, using
ChaiJS expect BDD
syntax.
pm.response.to.have.*
and pm.response.to.be.*
to build your assertions.
require
method allows you to use the sandbox
built-in library modules. The list of
available libraries is listed below with
links to the corresponding
documentation.
_
object v3.10.1 exists in the
sandbox by default. Use require
to load the latest
version.)
require
method, pass the module name as a
parameter, and assign the return object
from the method to a variable.