I would like to hear if any of you are using different app for API testing than Postman.

I’m not telling that Postman is bad, but maybe there’s all that I should check out. Recently I tried RapidApi and even tho the app is kinda cool I missed few options and went back to Postman for now.

@caesura@lemmy.ninja
link
fedilink
English
41Y

If you’re on a Mac, I recommend the RapidAPI native HTTP client. It used to be called Paw and it recently got acquired by the RapidAPI team but it hasn’t changed much and still works pretty well IMO. I’ve been using it for years to test out APIs and i like it better than Postman.

@Grappling7155@lemmy.ca
link
fedilink
English
81Y

I’m using the vscode extension called Thunderclient

@kambusha@feddit.ch
link
fedilink
English
21Y

Same. I like this so I don’t need to open a second app. Only used PostMan and ThunderClient, so can’t comment on others.

Yeah it’s called curl lol

This is the way.

@pfrost@sh.itjust.works
link
fedilink
English
3
edit-2
1Y

No joke, I use curlie, .curlrc and a bunch of scripts

@Icarus@lemmy.ml
link
fedilink
English
11Y

can you elaborate a bit on that ? I’ve only used curl from cli and never used .curlrc. and what’s curlie ?

@pfrost@sh.itjust.works
link
fedilink
English
11Y

Curlie is a wrapper on curl that makes more ergonomic to use. I set path to cookie jar in .curlrc. I sync cookies from the browser.

Another vote for Insomnia here. I used to use Insomnia primarily until a lot of my work switched over to gRPC and I’ve found that Postman works a lot better for that. I still prefer Insomnia for the simple UX and speed, just wish it had better gRPC support.

@Sheldan@programming.dev
link
fedilink
English
1
edit-2
1Y

I do have some bugs with Insomnia, for example with the oauth configuration failing. (I think it has something to do with some variable there failing) You can workaround that by just removing oauth, and configuring again, but its annowing.

I still like insomnia overall tho.

@schnex@reddthat.com
link
fedilink
English
101Y

I mostly use httpie on the fish shell with autocompletion for quick requests, but it’s no replacement

I also have been using httpie for a few years - it is really great.

Recently I have started using nushell which has a similar module builtin: https://www.nushell.sh/commands/docs/http_get.html Combined with rest of the nicities in nushell its a pretty good cli experience.

@person4268@lemm.ee
link
fedilink
English
11Y

How’s nushell been for you so far? I took a look at it once when it was relatively new and was missing some features I needed, like shell scripts.

@sosdoc@programming.dev
link
fedilink
English
51Y

httpie now also has a postman-like UI! Been using it for a while and I’m liking it for what it is - https://httpie.io/app

Insomnia used to be good, but it’s WebKit, so really heavy to run, it crashed my PC several times

If you’re not strictly looking for GUI tools, you might want to look into httpie or the http command built into the nu shell.

Delta
link
fedilink
English
91Y

Insomnia user here too, I’ve found it to be simple,clean and to my taste.

@abhibeckert@lemmy.world
link
fedilink
English
7
edit-2
1Y

I recommend Visual Studio Code and one of the following two extensions:


Either one isn’t really the full picture - you’ll ned to combine it with other extensions - such as a good JSON language extension (which will give you syntax highlighting, error checking, code folding/etc.

The most important extension is CoPilot. That’s the killer feature which makes Visual Studio Code vastly better than Postman.


Thunder is very similar to Postman. Not much to say other than it works well, it’s free, millions of people use it.

It’s not really my cup of tea, but I do think it’s better than Postman because you can use your own version control servers to collaborate with colleagues, which is generally better (and cheaper) than Postman’s collaboration service in my opinion (you get diffs, code review, pull requests, history, etc etc for all your most important API tests).


Personally I prefer REST Client (also free, and has even more users than Thunder).

REST Client is really simple. It adds a new “HTTP” text file type. You simply type a HTTP request into the file and hit a hotkey (or click a button) to execute the request. And it shows you the response. Easy.

HTTP requests and responses are just plain text, and you can simply save those as files in your project. REST Client also has basic support for variables, API credentials, etc. Not quite as user friendly as Postman or Thunder Client, but it makes up for that by being straightforward and flexible.


CoPilot Chat, works with both, but having everything in plain text gives it more control over REST Client than Thunder Clinet you can write (and edit) your requests with a series of simple plain english prompts. E.g. “JSON request with a blog post body” will give you:

POST https://example.com/blog/posts
Content-Type: application/json

{
    "title": "My First Blog Post",
    "body": "This is the content of my first blog post. It's not very long, but it's a start!",
    "author": "John Doe",
    "tags": ["blogging", "first post"]
}

You might follow that up with “Add a UUID” or “Add a JWT auth header”.

Copilot can answer questions too - e.g. “How do I unsubscribe a user with the Mailchimp API?” They use the “HTTP PATCH” request type - WTF.

Earl Turlet
link
fedilink
English
71Y

I use Hurl. Everything is just a text file:

POST https://example.org/api/tests
{
    "id": "4568",
    "evaluate": true
}

HTTP 200
[Asserts]
header "X-Frame-Options" == "SAMEORIGIN"
jsonpath "$.status" == "RUNNING"    # Check the status code
jsonpath "$.tests" count == 25      # Check the number of items
jsonpath "$.id" matches /\d{4}/     # Check the format of the id

Came here to write this, so you get my upvote instead.

I don’t actually use Hurl, I use Jest (since I’m usually writing in TS) so that I can prep state before and confirm it afterwards and fully ensure that the request did what it was supposed to do, but if you’re already just using Postman, you’re likely not testing your state, and Hurl is a SIGNIFICANT improvement.

Edit text files in any editor. Run it from the command line. Include it in your CICD with ease. It’s an incredible tool and it deseres to be far, far more popular than it is.

snowe
mod
link
fedilink
English
11Y
Earl Turlet
link
fedilink
English
31Y

It’s very similar to what JetBrains has and you can easily translate between the two (assuming you aren’t using assertions or any Hurl-specific features), but not exactly the same syntax.

I tend to go with Hurl because it’s self contained and you can do things like throw it in your CI builds.

snowe
mod
link
fedilink
English
11Y

that’s really neat… I’ve wanted to use it in CI but hadn’t found a way. I might look into this.

@Code@programming.dev
link
fedilink
English
41Y

Insomnia.kong

Joshua Cohen
link
fedilink
English
61Y

I just started using Insomnia and I really like it, highly recommended!

I stopped using postman in favor of just writing Python scripts to test what I was testing. 🤷‍♂️

(I’m getting tired of learning new tools when I only end up needing some surface level functionality that I can quickly write myself. Maybe that’s just me.)

I must be the only moron using JMeter in place of Postman.

@prwnr@programming.dev
creator
link
fedilink
English
11Y

real madman. I remember using JMeter few years ago and it was a nightmare. Did it improve over the last 5 years?

It seems about the same. The only real improvement that I’ve noticed, and maybe I just had it set up wrong, is that it can now handle high resolutions. The first time I used it the text was impossible to read. It has a lot of really cool features, but it’s not the friendliest software.

@alchemist_dev@programming.dev
link
fedilink
English
1
edit-2
1Y

xh and tiny shell scripts.

Example: sign-up-forbidden-username.req

#!/bin/bash
xh POST http://0.0.0.0:2884/sign-up usename=admin password=pw

to run ./sign-up-forbidden-username.req

This returns 403 and “Username is unavailable”

https://github.com/ducaale/xh

xh is a rust implementation of httpie. They’re going for full parity, and works really well for what I need it for so far You can also read input from a file. Which IMO makes GUI API testing seem silly.

Create a post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



  • 1 user online
  • 1 user / day
  • 1 user / week
  • 1 user / month
  • 1 user / 6 months
  • 1 subscriber
  • 1.21K Posts
  • 17.8K Comments
  • Modlog