question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature proposal: saving current request setup under named alias

See original GitHub issue

This is great package, thanks for sharing your work!

As I’ve been using it couple of days I noticed that it’s quite inconvenient, having to repeatedly change request settings every time I want to send different request.
The option of saving current state of request would solve the problem.

Given this output of httpie post:

http://127.0.0.1:3000/api/oauth/token> http --form --style native POST http://127.0.0.1:3000/api/oauth/token user_id==value client_id=value client_secret=value grant_type=password password=test  username=testuser1 Content-Type:application/x-www-form-urlencoded

We could use eg.: http://127.0.0.1:3000/api/oauth/token> alias getToken

which would save the request under getToken keyword. Later, we could call getToken request and optionally overwrite any req options like so:

http://127.0.0.1:3000/api/oauth/token> getToken username=testuser2 password=test2

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
eliangcscommented, Aug 18, 2016

@fogine I think exec is a great idea! A user can use source to override context partially, while exec can be used to replace the current context with a new one.

The file path should be relative to the current working directory. When we have shell command support (WIP in #61), we can do something cool like:

> value=="a very long string"
> env > ./out.txt

# Compute sha1 hash of 'value' in shell, and assign back to querystring parameter 'value_sha1'
> value_sha1==`cat ./out.txt | grep value | sed "s/^value==//g" | sha1sum`
0reactions
foginecommented, Aug 21, 2016

@eliangcs, I completely forgot that it was me who has started using the enum module. I replaced the enum for a regular class. Now it works, thanks very much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Powercfg command-line options - Microsoft Learn
Use powercfg.exe to control power plans - also called power schemes ... /change, /X, Modifies a setting value in the current power scheme....
Read more >
Cisco MDS 9000 Series Fabric Configuration Guide, Release ...
The device alias feature uses two databases to accept and implement device alias configurations. Effective database—The database currently used ...
Read more >
Preferences > General Preferences | Alias Products 2023
Lets you customize various settings and options of Alias. ... Check on this option to save a separate snapshot of the current window...
Read more >
Update instance settings - Amazon Connect
On the instances page, choose the instance alias. The instance alias is also your instance name, which appears in your Amazon Connect URL....
Read more >
Attributes and Aliasing - Datadog Docs
Datadog automatically retrieves corresponding host tags from the matching host in Datadog and applies them to your logs. The Agent sets this value...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found