// I need to

ModernizeUpgrade without breaking it RescueFix what someone else started Build NewTurn an idea into a product Reach More PeopleGet found, get used, include everyone

// Company

Case StudiesExpertiseAbout + CareersResourcesContact Book a call →
≡articleRescue

Exploring & Debugging APIs with Paw

Paw, a REST client for Mac, lets you build and reuse HTTP requests, inspect responses, and generate code. A look at using it to explore and debug APIs.

Art+Logic Jul 10, 20153 min read

From the Art+Logic archive · written in 2015. The tools may have moved on; the thinking still holds.

Exploring & Debugging APIs with Paw

The team at Lucky Marmot bills Paw as “The Ultimate REST client for Mac” and in my experience with the app so far it lives up to the claim.

The app allows you to make HTTP requests, inspect the responses, and even generate code for the requests for a number of languages and tools. If you’re developing your own API or learning how to interact with a third party one, Paw quickly becomes an invaluable and indispensable debugging and development tool.

Making Requests

Paw is focused on making HTTP requests that you can configure, edit, duplicate, and reuse. It allows you to set request headers, options, URL params, and more so that you can make everything from a simple GET request to performing a multi-part file upload. It includes formatters to make sure you’re request is easy to create and validation warnings to let you know when you’ve likely got something wrong. It often offers a way to quickly fix any issues too. Paw allows you to name, group, and sort requests in a document that can be shared with the rest of your team.

Where it really shines is when you start reusing requests with Cookie Jars, Dynamic Values, and Environments. Cookie Jars are essentially swappable cookie stores that allow you to make requests while simulating different user sessions or other conditions stored as cookies. Dynamic Values allow you to access data from previous responses, perform functions on that data, or generate new data to include in your requests. Paw includes a number of common Dynamic Values, and allows you to install (or create your own) extensions to add new ones. Finally, Environments allow you to define collections of variables to use within requests. For example, if you’re working with an API on a staging and production server you can define variables for the host and port in a Staging and Production environments, and quickly switch between them to make and compare requests to the different servers without modifying your request.

Inspecting Responses

Once you’ve made a request you’ll be able to see the response value, headers, and status code, what you’d expect. You’ll likely spend most of your time inspecting the response body and Paw does a great job of formatting it as text, formatted JSON, raw JSON text, XML, or can display any HTML in a web view. Chances are you’re dealing with JSON and Paw formats the data as a nice outline, letting you expand or collapse arrays and dictionaries as necessary.

Code Generation & Extensions

Once you’re happy with the request  you’ve configured, you can use a Code Generator to generate code for many popular languages and tools, or if one isn’t available that you want can develop a custom one as an Extension. This isn’t a feature I’ve used much, but could definitely see it being useful.

Extensions are one of the coolest features of Paw, and come in three flavors: Code Generators, Dynamic Values, and Importers. They’re built using JavaScript or CoffeeScript. I haven’t gotten as far as developing my own extension yet but from looking at the source of a few in Lucky Marmot’s collection on GitHub it doesn’t look that difficult. While checking out the Importers I found about Swagger, API Blueprint, Apiary, and Mashape too and plan to spend some time checking them out. The API documentation, testing, and management tools available here look awesome and integrate with Paw pretty easily too.

What’s Missing?

I’ve been using Paw as a companion to Charles while developing some iOS apps and it would be great if Paw had a proxy server built in so that you could record HTTP traffic, then edit and replay the requests. I’m not sure if a proxy server is on the roadmap for the team at Lucky Marmot or not, so I’ll look into building an Importer to import one of the formats that Charles can export to save myself some time in future projects.

Getting a Copy

Paw is available on the Mac App Store and available directly from Lucky Marmot for $29.99. They’ve got a nice explanation of the differences between the two versions as part of their documentation. I got my copy directly to have access to earlier updates and to give the developers their full cut of the $30.

keep going

More to explore in Rescue.

All Rescue resources →
let's talk

Got a problem like this one?

Tell us what's stuck. A real person replies within one business day.

Talk to our team →

Talk to people who know software, not a sales script.

Your first call is with Aja, our VP of Sales. He'll help make sure you're solving the right problem. Here's what you'll cover together:

  1. What you're trying to accomplish

    The business goal first, then the technology.

  2. Possible approaches

    And the tradeoffs of each, in plain language.

  3. Risks you may not have considered

    Technical and business, before they cost you.

  4. Whether AI changes the math

    What's practical, and what's just hype for your project.

  5. Sensible next steps

    Even if the right next step is not us.

book-a-call.ics

Loading the scheduler…

Open the booking page →

Some problems are easier to explain in writing. Send us a few lines about what you're working on, and we'll reply within one business day. Helpful to include:

  1. What the software does, or should do
  2. What's stuck, or what's worrying you
  3. Any deadline or budget you have in mind
note.md

Loading the form…