-
-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d9255d
commit b4353fb
Showing
11 changed files
with
72 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### External body | ||
POST https://example.com:8080/api/html/post | ||
# rest.nvim can guess and fill the Content-Type header from file path | ||
|
||
< ./input.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# form-urlencoded type is recognized with `Content-Type` header | ||
|
||
### form-urlencoded | ||
POST https://ijhttp-examples.jetbrains.com/post | ||
Content-Type: application/x-www-form-urlencoded | ||
|
||
key1=value1&key2=value2&key3=value3&key4=value4&key5=value5 | ||
|
||
### form-urlencoded (multiline) | ||
# you can put some whitespaces in urlencoded form | ||
# rest.nvim will recognize whitespaces and remove them before request | ||
POST https://ijhttp-examples.jetbrains.com/post | ||
Content-Type: application/x-www-form-urlencoded | ||
|
||
key1 = value1 & | ||
key2 = value2 & | ||
key3 = value3 & | ||
key4 = value4 & | ||
key5 = value5 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# all bodies including json are treated as raw body | ||
|
||
### json body | ||
# request body starting with `{\n` will have json syntax injection via tree-sitter | ||
# rest.nvim provides opt-out json validation feature | ||
POST https://example.com HTTP/1.1 | ||
Content-Type: application/json | ||
|
||
{ | ||
"foo": 123 | ||
} | ||
|
||
### xml body | ||
# request body starting with `<.*` will have xml syntax injection via tree-sitter | ||
# rest.nvim provides opt-out xml validation feature | ||
POST https://example.com HTTP/1.1 | ||
Content-Type: application/xml | ||
|
||
<?xml version="1.0" encoding="utf-8"?> | ||
<Request> | ||
<Login>login</Login> | ||
<Password>password</Password> | ||
</Request> | ||
|
||
### raw body | ||
# all other bodies will be treated as raw body type | ||
POST https://example.com HTTP/1.1 | ||
|
||
Hello world! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
### dynamic variables | ||
POST https://reqres.in/api/users | ||
Content-Type: application/json | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
### basic get statement | ||
### prompt variables | ||
|
||
# Basic syntax of prompt variable: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters