Skip to content

Commit

Permalink
Add keybinding to view raw bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealLorenz committed Nov 27, 2023
1 parent 6e3b122 commit 62a9ffd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rq-cli/src/components/response_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ use super::{
BlockComponent, HandleResult, HandleSuccess,
};

pub const KEYMAPS: &[(&str, &str); 3] = &[
pub const KEYMAPS: &[(&str, &str); 4] = &[
("↓/↑ j/k", "scroll down/up"),
("Enter", "send request"),
("s", "save"),
("r", "show raw bytes"),
];

#[derive(Copy, Clone, Default)]
Expand Down Expand Up @@ -226,6 +227,9 @@ impl BlockComponent for ResponsePanel {
KeyCode::Char('s') => {
self.save_menu = Some(Popup::new(Menu::new(SaveOption::iterator().collect())));
}
KeyCode::Char('r') => {
self.show_raw = !self.show_raw;
}
_ => return Ok(HandleSuccess::Ignored),
};

Expand Down

0 comments on commit 62a9ffd

Please sign in to comment.