Skip to content

Releases: darrenburns/posting

2.1.1

12 Nov 00:26
c708caf
Compare
Choose a tag to compare

Fixed

  • Fix collection browser message not being visible when it's empty.

Changed

  • Improved message in empty collection browser, indicating keybind for how to toggle the collection browser.
    Full Changelog: 2.1.0...2.1.1

2.1.0 - Import curl commands

12 Nov 00:12
0e983dd
Compare
Choose a tag to compare

With Posting 2.1, you can now import curl commands by pasting them into the URL bar.

posting-curl-command-paste.mp4

Added

  • Import curl command by pasting it into the URL bar.

Changed

  • Collection browser width now adjusts based on content, so it doesn't waste a lot of space on larger screens.
  • Info tab now shows "Request not saved to disk" if a request has not been saved to disk, rather than "None" or nothing at all.

What's Changed

New Contributors

Full Changelog: 2.0.1...2.1.0

2.0.1

25 Oct 18:22
8f5354a
Compare
Choose a tag to compare

What's Changed

Fixes a performance regression and some visual issues.

Full Changelog: 2.0.0...2.0.1

2.0.0 - Scripting and keymaps

19 Oct 12:12
Compare
Choose a tag to compare

Posting is a powerful HTTP client that runs entirely inside your terminal.

Version 2.0 has just arrived, bringing some powerful new features to Posting, including scripting, keymaps, and more!

posting-screenshot

Pre-request and post-response scripts

A common feature request has been around adding scripting capabilities to Posting.
With 2.0, you can now attach Python functions to requests, and have them run before or after the request is sent.
All output from these scripts is captured and displayed in the new "Scripts" tab.
This makes it easy to see the results of your script executions and troubleshoot any issues.

script-output

This is an extremely versatile feature.
You can use scripts to perform setup, set variables which requests and other scripts can access, modify outgoing requests, and much more.
Here's an example of some Python code which you can attach to a request:

def on_request(request: RequestModel, posting: Posting) -> None:
    request.headers.append(Header(name="X-Custom-Header", value="foo"))
    request.auth = Auth.basic_auth("username", "password")
    print("Request is being sent!")
    posting.notify("Request is being sent!")

The API is currently a bit rough around the edges, but it'll be improved in future releases.

Attached scripts can even be edited in an external editor, and Posting will automatically reload them when they are changed.

auto-reload

There's also a convenience keyboard shortcut which allows you to quickly open a request's scripts in your preferred $EDITOR,
so you could quickly swap over to vim or nano to make changes, then return to Posting to continue working.

Check out the scripting docs for more details!

Keymaps

Posting 2.0 also allows you to declare custom keybindings, thanks to an update in the underlying Textual framework.
For 2.0 only "global" keybindings can be remapped, but this will be expanded in future releases to include most keybindings.

You can customise your keymap by adding a keymap section to your Posting config.
Here's a short example which changes the default for sending the request to ctrl+r:

keymap:
  send-request: "ctrl+r"

Hopefully this will help you feel more at home in Posting, and avoid awkward clashes with emulators and multiplexers!

See the keymap docs for more details!

Customisable hostnames

Posting is a TUI, which means it works great over SSH.
However, when working inside a TUI, it's sometimes easy to forget which host you're on.

In 2.0, there's a new config option which allows you to customise the hostnames which are displayed in the header, including styling them with Rich markup to make them stand out.

This is useful if you work with Posting in multiple environments, such as your local machine, a staging server, and a production server.

header-local

production-blink

Here's the config I use on my "production" server to achieve the effect above:

heading:
  hostname: "[black on #ff0000 bold blink]PRODUCTION[/]"

Documentation

Posting's documentation has been expanded, making it easier than ever to get started!

The additions include:

Auto-focus

Posting has several config options for automatically switching focus on certain events.
There's a new one for switching focus when a request is opened: focus.on_request_open!

What's next?

Textual 1.0 is around the corner, and will unlock a better theming system for Posting as well as a more powerful command palette!

I've also braindumped some features I'd like to implement in Posting here.

The new features mentioned in this post and those on the roadmap are very much driven by users.
If you'd like to suggest new features, please open a discussion on GitHub!

Known issues

  • There's a performance regression with entering jump mode and opening the command palette. This will be fixed in an upcoming release. You may wish to stay on 1.13.0 for now if you're on a slower machine and finding the delay irritating!

1.13.0

08 Sep 21:13
Compare
Choose a tag to compare

What's Changed

With this release, Posting will watch loaded environment files and refresh the UI to reflect changes in them. There's some new config for hiding the collection browser on startup too, and a bunch of smaller changes. See the log below for more info.

Added

  • New collection_browser.show_on_startup config to control whether the collection browser is shown on startup.
  • Watch for changes to loaded dotenv files and reload UI elements that depend on them when they change.

Changed

  • Upgraded all dependencies.
  • Remove pydantic-settings crash workaround on empty config files.
  • Renaming App.maximized as it now clashes with a Textual concept.
  • Removed "using default collection" message from startup.

Fixed

  • Fixed crash while rendering error message on timeout.

Full Changelog: 1.12.3...1.13.0

1.12.3

04 Sep 19:21
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 1.12.1...1.12.3

Note: 1.12.2 was yanked. It's equivalent to 1.12.1.

1.12.1

21 Aug 21:26
Compare
Choose a tag to compare

Fixed

  • Fix "invalid escape sequence" warnings on Python 3.12+
  • Fix buttons in request deletion confirmation modal not being usable with the enter key.

Full Changelog: 1.12.0...1.12.1

1.12.0

17 Aug 12:49
Compare
Choose a tag to compare

Added

image

Full Changelog: 1.11.0...1.12.0

1.11.0

15 Aug 07:17
Compare
Choose a tag to compare

Added

  • Duplicate request (with new request popup) under cursor in tree with d.
  • "Quick" duplicate request (without new request popup, request name is auto-generated) under cursor in tree with D (shift+d).
  • Delete request (with confirmation modal) under cursor in tree with backspace.
  • "Quick" delete request (without confirmation modal) under cursor in tree with shift+backspace.
  • "Quit Posting" added to command palette.
  • Move the sidebar to the right or left using collection_browser.position: 'right' | 'left' config.
  • Refinements to "galaxy" theme.
  • "galaxy" theme is now default.
  • Help text added to "empty state" in the collection browser.
  • Extend info in the "Collection Browser" help modal.
  • Visual indicator (a red bar on the left) on Input fields that contain invalid values.
  • Toast message now appears when trying to submit the 'new request' modal with invalid values.

Fixed

  • Ensure the location of the request on disk in the Info tab wraps instead of clipping out of view.
  • Inserting requests in sorted position on creation.
  • Prevent creating requests with no name.
  • Prevent submitting paths in the file-name field in the new request modal.
  • Prevent specifying paths outside of the open collection dir in the directory field in the new request modal.
  • Fix variables not being substituted into several fields, including auth.

Changed

  • Upgrade to Textual version 0.76.0
  • Change logic to render bindings in help modal to reflect new Textual API.
  • Sort order of requests in the tree improved.

1.10.1

05 Aug 21:02
Compare
Choose a tag to compare
  • fix: Disable Textual's AUTO_FOCUS behaviour, as it was causing focused widget to change unexpectedly on unmounting a screen.

Full Changelog: 1.10.0...1.10.1