HTTP Request response not available in .http - file
Hello,
I don't see the response in my .http - File.
1. I create a new file (File => New => HTTP Request) - Name: MyTest
2 I got a new File with this content:
# For a quick start check out our HTTP Requests collection (Tools|HTTP Client|Open HTTP Requests Collection).
#
# Following HTTP Request Live Templates are available:
# * 'gtrp' and 'gtr' create a GET request with or without query parameters;
# * 'ptr' and 'ptrp' create a POST request with a simple or parameter-like body;
# * 'mptr' and 'fptr' create a POST request to submit a form with a text or file field (multipart/form-data);
After that I add content to that file - The file looks now like this:
# For a quick start check out our HTTP Requests collection (Tools|HTTP Client|Open HTTP Requests Collection).
#
# Following HTTP Request Live Templates are available:
# * 'gtrp' and 'gtr' create a GET request with or without query parameters;
# * 'ptr' and 'ptrp' create a POST request with a simple or parameter-like body;
# * 'mptr' and 'fptr' create a POST request to submit a form with a text or file field (multipart/form-data);
POST https://httpbin.org/post
Content-Type: application/json
{
"id": 999,
"value": "content"
}
When I click on the green arrow (left besde the word "POST") the request runs
Now it opens the "run" window with the response.
In my .http File there are now three "#" on the bottom - But no link to the resonse:
(MyTest.http after running the request) - only the thre '#': are added
# For a quick start check out our HTTP Requests collection (Tools|HTTP Client|Open HTTP Requests Collection).
#
# Following HTTP Request Live Templates are available:
# * 'gtrp' and 'gtr' create a GET request with or without query parameters;
# * 'ptr' and 'ptrp' create a POST request with a simple or parameter-like body;
# * 'mptr' and 'fptr' create a POST request to submit a form with a text or file field (multipart/form-data);
POST https://httpbin.org/post
Content-Type: application/json
{
"id": 999,
"value": "content"
}
###
If I create it from the REST Client => Convert request to the new format
then after running this request there is a new line in the File (at the bottom):
POST https://httpbin.org/post
Content-Type: application/json
{ "id": 999, "value": "content" }
<> 2018-07-04T114133.200.json
###
This line is added:
<> 2018-07-04T114133.200.json
This is a link to the request (and the runwindow opens, too).
So why is this link (with the <> in front) not in my file?
I'm doing something wrong?
cu
Please sign in to leave a comment.
Using the Show HTTP Requests history appears to open a log file, but that isn't the same as having the responses listed below the actual request and being able to compare those responses.
I appear to have the same issue. It works fine when using a scratch file, but if I use an HTTP request file that I have created as part of the project, the responses are not listed below the request as they are in the scratch file.
I start with the request in the http file.
I run the request, and see the output in the run window that appears. I would then expect the following to appear:
That would be great, except, that is not what happens.
does not appear below the request.
There's a button called Show HTTP Requests History in the upper right Editor corner, the responses are logged there.
You can ctrl+click on <> 2018-07-20T034505.200.json - this would open a corresponding response. You can open multiple responses and compare them
Hi, That is the problem. The link to the response doesn't appear under the request after the response has been received. As per the original poster's issue.
So you just want this link to be added under the request body (some sort of a usability improvement)?
If that's true - please submit this at http://youtrack.jetbrains.com/issues/WI#newissue=yes for our developers to look into.
This feature already exists when you use a scratch file. If you create an HTTP scratch file, this is exactly what happens, but if you create an HTTP file as part of the project, this does not happen.
Therefore the feature already exists - mentioned here
I would just expect it always to happen, rather than having to use a scratch file to use that functionality.
Thanks, got it.
I believe that this is done intentionally: some users (me personally) wouldn't want their original .rest or .http to be filled with response links.
But you still can submit this at http://youtrack.jetbrains.com/issues/WI#newissue=yes for a developer to review.
ok, if that is actually intentional, that is fine - I had just thought it wasn't working correctly.
It isn't such an issue that I would make a feature request. I'll continue to use a scratch file for the functionality.
Thanks for taking the time to investigate.
Thank you for bringing our attention to this.