http-prompt icon indicating copy to clipboard operation
http-prompt copied to clipboard

Support for setting variables based on response data

Open sarumont opened this issue 4 years ago • 9 comments

It would be nice to be able to set variables for a future request (or cd to a path) based on the previous response data. Something like JSONpath syntax would be simple yet effective:

Response body:

{
  "id": "17f96808-886a-452e-bbc7-956d27c6cd9d",
  ...
}

> fooId=$.id

> cd $.id

sarumont avatar Oct 01 '21 03:10 sarumont

Oh wow! I never thought this feature would be missing. That'd be a really huge improvement. I don't want to copy the data like JWT token all the time.

nejdetckenobi avatar Oct 06 '24 09:10 nejdetckenobi

It has been 3 years, does anybody have any update on this? We started using httpie at work, but this is a feature I see lacking the most comparing to our previous API tool.

JamilleN avatar Dec 06 '24 15:12 JamilleN

This is... a huge bummer. I was loving HTTPie until this haha

alansikora avatar Dec 11 '24 15:12 alansikora

Unfortunately I had to switch back to Insomnia, Dynamic variables based on response body is critical for me.

mretkoceri avatar Feb 04 '25 10:02 mretkoceri

also waiting this feature

pawlek avatar Mar 05 '25 19:03 pawlek

I am also waiting for this feature to make httpie my main one

matheusvieiragoncalves avatar Mar 21 '25 13:03 matheusvieiragoncalves

+1 this would be really helpful

ghoshabhi avatar May 13 '25 19:05 ghoshabhi

waiting to implement something that already exists in the old insomnia

yungsilva avatar Jul 23 '25 13:07 yungsilva

+1 this would be really helpful

inarli avatar Oct 20 '25 11:10 inarli