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
0
votes
0 answers

How do i upload a image file with Axios from a form

I need to upload a image file to my API with Axios calls But i keep getting a error code 500 no matter what i do? Here is what i have done so far. import React, { useState, useContext, useEffect } from "react"; import Axios from "axios"; //…
Daniel707
  • 15
  • 2
0
votes
1 answer

How to get a page with a redirect through a fetch request?

I'm trying to fetch a page after a redirect, but I'm getting a 401 status in the response. async function getPage(cookie, jsid) { let params = { method: "GET", headers: { cookie: jsid, Cookie: cookie, "content-type":…
lian. lun
  • 115
  • 1
  • 1
  • 9
0
votes
0 answers

How to use insomnia to make multiple requests and store results

Is it possible to take a array of ids, make a separate call based on each ID, and the store the results in separate files using insomnia? I don't want to chain the calls. I have a preset list of IDs and I simply want to make those calls and then…
Joshua Foxworth
  • 1,236
  • 1
  • 22
  • 50
0
votes
1 answer

How to send a List of Object on Insomnia or Postman with multipart/form-data structure

I have a fromForm List object on my Post method like this: [FromForm]List ObjectDto and I can't test on Insomnia (UI) nor Postman (UI) because I have no idea how to pass a list of objects. I have tried many ways but didn't work,…
0
votes
1 answer

Im trying to make a simple CRUD, and when I try to make the POST, it throws me an error, 46201

Evenings, Im trying to make a simple CRUD, adn I made the GET, so i guess de DB connection is OK, but when I try to make the POST, it throws me an error, 46201. I tried making the query in pgAdmin and it works (insert values in table), idk if its…
0
votes
0 answers

Create models for REST application in Spring Boot with Insomnia

I heard it is possible to create/define models for REST applications (e.g. in Java/Spring Boot) with Insomnia. However I couldn't find anything helpful so far. Also in the documentation and the plugin section I found nothing. Did anyone hear about…
insomnius
  • 3
  • 2
0
votes
1 answer

Invalid Cookie Header returned by GET controller in both POSTMAN and Insomnia

I have the following Spring controller class: @CrossOrigin @RestController @Slf4j public class RcmApi extends ApiController { @Value("${rcmRestApiServer}") private String rcmRestApiServer; @GetMapping(value = "/rcm/api/v1/matter/{matterId}",…
Jason
  • 2,495
  • 4
  • 26
  • 37
0
votes
1 answer

Pass in custom query variables to a GraphQL query in an Insomnia Unit Test

Using an Insomnia design document, I created a query and a unit test that runs tests on that query. The query has a query variable which is configured as part of the query in the "Debug" tab in Insomnia. The query looks like this: query Test($bar:…
eddex
  • 1,622
  • 1
  • 15
  • 37
0
votes
0 answers

TypeError: Cannot read properties of undefined (reading 'nome')

I'm trying to make an API using nodeJS, express and Sqlite and Insomnia for requests. I created the tables and everything worked out, it gives no error, but when I do the POST request by Insomnia, the console returns the error TypeError: Cannot read…
0
votes
0 answers

{ user_id } is incrementing when im requesting an access token in Instagram Basic Display API using Insomnia and Axios

Im sending "POST" request to https://api.instagram.com/oauth/access_token to obtain an access token in order to fetch instagram user basic info. But I notice when im calling the api above using exact same credential but different way then the {…
0
votes
0 answers

How to download file from http response with no body

I have a http response from website that should return excel file. Status is OK (200) but the body is empty. When I check headers there is something what looks like my desired file. Only thing I saw how to download was from response body. I tried…
Michal Palko
  • 601
  • 1
  • 4
  • 14
0
votes
1 answer

C# Sending a JSON object with a list to WebAPI is coming up null

I have a class object that contains a list of user emails. public class UserAccount { public string UserName {get; set;} public List UserEmails {get; set;} } When passing a json object in Insomnia to my web api post method. The username…
CodeMan03
  • 570
  • 3
  • 18
  • 43
0
votes
1 answer

REST API Cannot get

Hi Im starting to learn how apis works and got my first stucktrace. The thing is that Im trying this code const app = require('express')(); const PORT = 8080; app.get('/tshirt', (req , res) => { res.status(200).send({ tshirt: 'blue', …
0
votes
0 answers

Fetch doesn't retrieve data

I am currently building a login form which will be using a restAPI for the registration/Auth but I'm receiving a 401 error when using fetch to test the retrieved data. console.log(fetch('http://localhost:5000/users/'), { method: 'get', …
0
votes
0 answers

Cannot POST /users/add in insomnia and postman

Here is my user schema: const mongoose=require('mongoose'); const userSchema=new mongoose.Schema({ username:{ type: String, required: true, unique: true, minlength: 3, }, password:{ type: String, required: true, …
Eya Dkhil
  • 13
  • 3