You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -66,6 +67,8 @@ Copy this complete configuration into your Lazy.nvim setup:
66
67
dry_run="<leader>hd",
67
68
copy_curl="<leader>hc",
68
69
save_response="<leader>hs",
70
+
set_project_root="<leader>hg",
71
+
get_project_root="<leader>hgg",
69
72
},
70
73
})
71
74
@@ -99,6 +102,8 @@ For full configuration options, see [Configuration Documentation](doc/configurat
99
102
-`:HttpDryRun`: Perform a dry run of the request under the cursor
100
103
-`:HttpCopyCurl`: Copy the curl command for the HTTP request under the cursor
101
104
-`:HttpSaveResponse`: Save the response body to a file
105
+
-`:HttpSetProjectRoot [path]`: Set the project root for file searching operations (use without arguments to be prompted for the path)
106
+
-`:HttpGetProjectRoot`: Display the current project root for file searching operations
102
107
103
108
### Keybindings
104
109
@@ -113,6 +118,8 @@ The plugin comes with the following default keybindings (if `create_keybindings`
113
118
-`<leader>hd`: Perform dry run
114
119
-`<leader>hc`: Copy curl command
115
120
-`<leader>hs`: Save response to file
121
+
-`<leader>hg`: Set project root for file searching
122
+
-`<leader>hpg`: Get current project root
116
123
117
124
## Features
118
125
@@ -128,6 +135,7 @@ The plugin comes with the following default keybindings (if `create_keybindings`
128
135
- Request profiling with detailed timing metrics
129
136
- Telescope integration for environment selection
130
137
- Autocompletion for HTTP methods, headers and environment variables
138
+
- Custom User-Agent header (`heilgar/nvim-http-client` by default)
131
139
- Compatible with [JetBrains HTTP Client](https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html) and [VSCode Restclient](https://github.com/Huachao/vscode-restclient)
console.log("Session ID extracted: " + sessionId);
123
+
} else {
124
+
console.log("No session ID found in response headers");
125
+
}
126
+
%}
127
+
128
+
### Use Session in Next Request
129
+
GET {{host}}/api/protected
130
+
X-Session-ID: {{session-id}}
131
+
```
132
+
133
+
**Note:** The `valueOf` method provides case-insensitive header lookup, so `response.headers.valueOf("mcp-session-id")` will work even if the actual header is `MCP-Session-ID` or `Mcp-Session-Id`.
134
+
104
135
## Saving Responses
105
136
106
137
You can save the current response body to a file using:
0 commit comments