Kong / Kong/insomnia

Import/export requests in raw http format.

Open
#5,850 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

### Discussed in https://github.com/Kong/insomnia/discussions/5849

Originally posted by **b-hayes** March 17, 2023
I really wish I could standardize how we share and use requests across applications without converting everything into a curl command first.

Let's say I have a bunch of raw HTTP requests eg:
```
POST /cats HTTP/1.1
Host: example.com
Accept: application/json
Accept-Encoding: gzip, deflate, br
Content-Type: application/json
Authorization: Bearer {{token}}

{"data":{}}
```
There appears to be no way to import this into insomnia. If I copy it and import it from the clipboard it does not understand the HTTP format.

Raw HTTP is easy to write and easy to read. Almost no conversion is needed to send it. It's easy to parse programmatically.

I was confused by oauth and other HTTP interactions until JetBrains made it possible to simply write raw HTTP requests and run them inside IDE without clicking a bunch of buttons and filling in forms.

Just using raw HTTP makes so much more sense and demystifies things. It's also really handy to copy and paste an API request or even plan an API during conversations with other developers in this format. It is easy for humans and web servers to understand and JB makes it easy for all of us to just copy-paste and run them.

But not everyone uses a JB IDE and Insomnia is a popular choice I feel like I am excluding people by using these modern conveniences.

It would be great if developers who love insomnia can join in and just paste a raw request into it without having to deconstruct the request into pieces and fill in a bunch of boxes or use some other program (like a JetBrains IDE) to convert it into curl first.

Instead of each application having its own way of constructing and representing HTTP requests and responses, it would be ideal if they could all just use HTTP syntax.

It boggles me why the majority of applications like this do not do this already. Seems so logical to me. I think it is important all these applications use a universal format and the HTTP standard seems the obvious choice.

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by locating Insomnia’s clipboard import and request import/export flows, then define the raw HTTP parsing and serialization behavior; done means a raw request can be imported and exported without conversion.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.