Http Client Response to File

I know that the client will redirect content by default to .idea/httpRequests  in the project folder heirarchy, but is there a way to force the naming or redirect to another location?

<> ./test1.txt

> ./test1.txt

and {{working_dir}} also doesn't seem to work with either

< is redirected input from a file

but > seems output stream only for JS-based response handling (yeah I was looking for a shortcut here)

What am I missing?

3 comments
Comment actions Permalink

Hi,

I don't think PyCharm has such an option. No mentions in documentation either (https://www.jetbrains.com/help/pycharm/exploring-http-syntax.html)

What I would do in your case is write a simple request tester using the excellent "requests" library (http://docs.python-requests.org/en/master/) , and save the response whereever I wanted.

But yeah, the buil-in HTTP tester can't do this it seems. Please feel free to submit a corresponding feature request to our issue tracker using the link https://youtrack.jetbrains.com/issues/PY and let us know if you need any help.

0
Comment actions Permalink

Thanks. Yeah, famliar with Requests, and it might go that route as well, but was hoping to keep some API testing pure and within the http.requests feature/framework. I just dislike where it saves the output and wanted the option to give a more easily accessible location (like the same project dir) and more meaningful names. I'll submit the enhancement request and let see if it is quick one or a decade long one!

 

https://youtrack.jetbrains.com/issue/PY-34965

0
Comment actions Permalink

@Andrew Angelopoulos

Just in case - I've moved the issue to PhpStorm project because they are the ones maintaining this feature, please don't change the project.

0

Please sign in to leave a comment.