Questions tagged [insomnia]

Insomnia is a desktop client for interacting with HTTP-based APIs.

Insomnia is a desktop client for interacting with HTTP-based APIs. It runs on macOS, Windows and Linux.

Web page: https://insomnia.rest/

203 questions
102
votes
5 answers

Yup schema validation password and confirmPassword doesn't work

import * as Yup from 'yup'; import User from '../models/User'; class UserController { async store(req, res) { const schema = Yup.object().shape({ name: Yup.string().required(), email: Yup.string() .email() .required(), password:…
Player Josu
  • 1,133
  • 2
  • 6
  • 6
56
votes
3 answers

How to chain requests using Insomnia (get token from login api to use as header for other api)

I'm trying to update the header for my apis with a sif token that is retrieved from another login call. I know how to do this in Postman. There I go to the Tests tab and add something like this for the login api, which would set my global…
Francislainy Campos
  • 3,462
  • 4
  • 33
  • 81
30
votes
2 answers

Insomnia upload pic and post data at same time

I'm having problem posting binary data and regular data at the same time. How I can test it with Insomnia? Insomnia offers only URL Encoded for data and Binary File for file. I cannot send both at the same time. What should I do to test uploading…
anduplats
  • 885
  • 2
  • 14
  • 24
25
votes
2 answers

ASPNetCore - Uploading a file through REST

I am using Insomnia for testing an API, but the same happens with Postman. I want to test a file upload, with the following controller: public async Task Post([FromForm]IFormFile File) If I set the request as a multipart request: it…
Thomas
  • 10,933
  • 14
  • 65
  • 136
22
votes
1 answer

Insomnia REST Client - Set "Content-Type" for multipart/form-data

TL;DR How can I set the Content-Type headers for each individual file/input/text in a multipart/form-data request (in Insomnia)? I'm trying to POST to the OneNote API (HTTP description) using the Insomnia Rest Client. Per the documentation, I need…
Diode Dan
  • 4,801
  • 6
  • 25
  • 34
20
votes
5 answers

Using OAuth2 how do I pull the access token into a variable?

I am trying to make a call to an authorization endpoint using OAuth2 with grant type Client Credentials - my call is successful - that is not an issue. However, I, now, want to take the access token that is returned and put it in a variable so I…
efultz
  • 1,135
  • 2
  • 11
  • 26
16
votes
1 answer

Insomnia : Error: SSL peer certificate or SSH remote key was not OK

I added my own certificate to a node.js express server for testing purposes. Then I attempted to contact the post from Insomnia, but I received an error message. Error: SSL peer certificate or SSH remote key was not OK The server code: const express…
ErmiaHP
  • 175
  • 1
  • 1
  • 7
11
votes
2 answers

Error: SSL connect error on Insomnia when trying to make a localhost request

Usually when creating a BaseUrl in Environments or defining the request url to test the API the developer ends up forgetting and putting Https: // instead of putting Http: // for a local test. So the SSL connect error happens, just set to http and…
AlessandroASB
  • 111
  • 1
  • 1
  • 3
10
votes
2 answers

Using Insomnia To Make Soap Calls

I am trying to use Insomnia to make soap calls - specifically trying to get post to succeed. I defined the URL as the end point and put the body type as XML with the SOAP contents (envelope, header, body). I defined the user id and password in the…
efultz
  • 1,135
  • 2
  • 11
  • 26
8
votes
1 answer

why Strapi dont fetch relationship in retrived data?

I created an API using strapi, and everything work fine until now. A have an "Event" and a "Stand" collection, I set up things in order to have multiple stands in event. I use Insomnia to try the API and fetch the data, and when I fetch the…
Unknow
  • 178
  • 2
  • 2
  • 12
7
votes
2 answers

Firestore HTTP Insomnia query : Stream error in the HTTP/2 framing layer

I'm trying to query my Firestore database using an HTTP query via the Insomnia API: https://firestore.googleapis.com/v1/projects/typebot/databases/(default)/documents/users with this body: { "structuredQuery": { "from": [ { …
Baptiste Arnaud
  • 2,522
  • 3
  • 25
  • 55
7
votes
1 answer

Perform Load Testing in Insomnia

Can I have some guidance on how to perform load testing by sending multiple POST API calls within a stipulated time frame n Insomnia. To achieve this, I have to POST the API calls in a for loop going from 0 to 500 in a span of 5 sec. What can I do…
tentner
  • 83
  • 1
  • 7
7
votes
1 answer

How to fix 'error: invalid_grant Invalid authorization code' when asking for reshresh_token from Spotify API?

I'm trying to receive refresh_token for my Ionic app, I successfully receive access_token. I receive code (authorization_code or access_token) from endpoint https://accounts.spotify.com/authorize?client_id= in my TypeScript project, I pass it to…
user3057645
  • 321
  • 1
  • 2
  • 10
7
votes
2 answers

Marvel API and Insomnia (or Postman): how do I pass the hash value that's required?

I'm a relatively new Javascript programmer and I'm experimenting with the Marvel API (I need to access the images for a project) and having a little trouble wrapping my head around the requirements. As I understand it, you need to pass a hash and a…
Cerulean
  • 5,543
  • 9
  • 59
  • 111
6
votes
5 answers

How can I set req.params in an Insomnia GET request?

Hi I don't have any code to show but I was just wondering how I can set parameters in a get request in Insomnia. Basically the paramaters in the url such as this one /test/:id where id is the parameter. I know that you can add queries but thats not…
lmircetic
  • 73
  • 1
  • 1
  • 4
1
2 3
13 14