Hi, this is the first step in a five-part series for people who are new to Postman in this video we'll walk through how to send a request using the Postman app. If you're new to Postman - Welcome! Learning a whole new thing can be a little bit overwhelming but if you stick it out through this entire series and really understand what's going on I promise you'll have a leg up on your peers and may be able to show them a thing or two when you're done. So most everybody knows Postman as an HTTP client, a handy way to send a request and receive a response. If you haven't already done this let's try it out now. In this example we'll use the Google Maps geocoding API, it's an API that provides geocoding and reverse geocoding of addresses. If we provide a street address this geocoding API will convert it to geographic coordinates like longitude and latitude. It's a very common type of API to use in mapping or location-based apps. For this API we'll need a key for the geocoding API which we can get from the Google developer portal. If you don't already have a key go ahead and get one now it takes two minutes to create a sample project, enable the API and get your key. In the geocoding API documentation let's get the request URL- this is the URL that will copy and paste into Postman. Alright, let's get started. Make sure you're not using the postman chrome app which is deprecated, you should be using the packaged app for Mac Windows or Linux. For this series I'm using the Postman standalone app for Mac OS X, I'm on version 6. Make sure you have a Postman account and you're logged in. Let's go ahead and leave the HTTP verb as a get request and when you paste the URL in to Postman you can already see it's a little tricky to read and really there's only a couple of parameters in this example request. Click the params button to expand the data editor. Now you can see it's a little bit easier to visualize the two parameters that were included in this request - address and key. Right away we can see that we'll need our API key. Now we could paste our key into the data editor right here and that would work but I'm going to teach you a better practice. In the params data editor replace the placeholder value with a new variable name. Google Maps geocoding API key. Surround it with double curly braces this variable is highlighted in red and when you hover over it you can see it's an unresolved variable. Let's go to the gear icon in the top right to open the environments manager and click Add to create a new environment. Let's name this environment and then add our first key value pair. The key will be the name of our variable Google Maps geocoding API key and then we can paste our API key as the value. Reconfirm the add. Now in the top right environment drop down make sure to select your new environment, if you hover over the quick look now you can see our new environment variable, and now when you hover over the variable in the params editor you can see it's reading this value from the selected environment. So we built our request in this top half, let's hit Send and now we can switch to the bottom section to view the response. It looks like the address we're geocoding is the Google office address - what if I want to geocode the Postman office address? Let's go ahead and update the address parameter with the Postman office street address. Hit Send again and inspect the response. Nice, at this point we can write a test parse the response to get the longitude and latitude or chain together this response to drive our next request. Keep watching to find out how. And that's it you finished part 1. We talked about building requests, inspecting the response and introduced the idea of using an environment variable to store any sensitive information like your API key. Not so hard right? Keep going and check out part 2.
Learn how to create video tutorials and make them work hard for you: attract new leads, increase sign-ups, and take a huge load off your team’s shoulders – so you can get back to your real work.