plz.el

An HTTP library for Emacs

GPL-3.0 License

Stars
200
Committers
4

Bot releases are visible (Hide)

plz.el - Latest Release

Published by alphapapa 2 months ago

Fixes

  • Expand filenames when downloading to files (which was already applied to filenames passed for uploading). (Thanks to Joseph Turner.)
plz.el -

Published by alphapapa 4 months ago

Compatibility

  • The minimum supported Emacs version is now 27.1. (It is no longer practical to test plz with Emacs versions older than 27.1. For Emacs 26.3, an earlier version of plz may be used, or this version might be compatible, with or without minor changes, which the maintainer cannot offer support for.)

Changes

  • Option plz-timeout is removed. (It was the default value for plz's :timeout argument, which is passed to Curl as its --max-time argument, limiting the total duration of a request operation. This argument should be unset by default, because larger or slower downloads might not finish within a certain duration, and it is surprising to the user to have this option set by default, potentially causing requests to timeout unnecessarily.)
  • Using arguments :as 'file or :as '(file FILENAME) now passes the filename to Curl, allowing it to write the data to the file itself (rather than receiving the data into an Emacs buffer and then writing it to a file. This improves performance when downloading large files, significantly reducing Emacs's CPU and memory usage).

Fixes

  • Improve workaround for Emacs's process sentinel-related issues. (Don't try to process response a second time if Emacs calls the sentinel after plz has returned for a synchronous request. See #53. Thanks to Joseph Turner for extensive help debugging, and to USHIN for sponsoring some of this work.)
  • Inhibit buffer hooks when calling generate-new-buffer (as extra protection against "kill buffer?" prompts in case of errors). (See #52. Thanks to Michał Krzywkowski.)
    • Avoid "kill buffer?" prompts in case of errors on Emacs versions before 28. (See #52 and #57. Thanks to Michał Krzywkowski.)

Development

  • plz is now automatically tested against Emacs versions 27.1, 27.2, 28.1, 28.2, 29.1, 29.2, 29.3, and a recent snapshot of the master branch (adding 29.2 and 29.3).
plz.el -

Published by alphapapa 6 months ago

Additions

  • Function plz now accepts a :filter argument which can be used to override the default process filter (e.g. for streaming responses). (#43, #50. Thanks to Roman Scherer.)
plz.el - v0.7

Published by alphapapa over 1 year ago

Changes

  • A new error signal, plz-error, is defined. The existing signals, plz-curl-error and plz-http-error, inherit from it, so handling plz-error catches both.

    NOTE: The existing signals, plz-curl-error and plz-http-error, are hereby deprecated, and they will be removed in v0.8. Applications should be updated while using v0.7 to only expect plz-error.

Fixes

  • Significant improvement in reliability by implementing failsafes and workarounds for Emacs's process-handling code. (See #3.)
  • STDERR output from curl processes is not included in response bodies (which sometimes happened, depending on Emacs's internal race conditions). (Fixes #23.)
  • Use with-local-quit for synchronous requests (preventing Emacs from complaining sometimes). (Fixes #26.)
  • Various fixes for :as 'buffer result type: decode body when appropriate; unset multibyte for binary; narrow to body; don't kill buffer prematurely.
  • When clearing a queue, don't try to kill finished processes.

Internal

  • Response processing now happens outside the process sentinel, so any errors (e.g. in user callbacks) are not signaled from inside the sentinel. (This avoids the 2-second pause Emacs imposes in such cases.)
  • Tests run against a local instance of httpbin (since the httpbin.org server is often overloaded).
  • No buffer-local variables are defined anymore; process properties are used instead.
plz.el - v0.6

Published by alphapapa over 1 year ago

Additions

  • Function plz’s :body argument now accepts a list like (file FILENAME) to upload a file from disk (by passing the filename to curl, rather than reading its content into Emacs and sending it to curl through the pipe).

Fixes

  • Function plz’s docstring now mentions that the :body argument may also be a buffer (an intentional feature that was accidentally undocumented).
  • Handle HTTP 3xx redirects when using :as 'response.
plz.el - v0.5.3

Published by alphapapa over 1 year ago

0.5.3

Fixes

  • Move new slot in plz-queue struct to end to prevent invalid byte-compiler expansions for already-compiled applications (which would require them to be recompiled after upgrading plz).

0.5.2

Fixes

  • When clearing a queue, only call plz-queue’s finally function when specified.

0.5.1

Fixes

  • Only call plz-queue’s finally function when specified. (Thanks to Dan Oriani for reporting.)

0.5

Additions

  • Struct plz-queue’s finally slot, a function called when the queue is finished.
plz.el - v0.4

Published by alphapapa over 1 year ago

Additions

  • Support for HTTP HEAD requests. (Thanks to USHIN, Inc. for sponsoring.)

Changes

  • Allow sending POST and PUT requests without bodies. (#16. Thanks to Joseph Turner for reporting. Thanks to USHIN, Inc. for sponsoring.)

Fixes

  • All 2xx HTTP status codes are considered successful. (#17. Thanks to Joseph Turner for reporting. Thanks to USHIN, Inc. for sponsoring.)
  • Errors are signaled with error data correctly.

Internal

  • Test suite explicitly tests with both HTTP/1.1 and HTTP/2.
  • Test suite also tests with Emacs versions 27.2, 28.1, and 28.2.
plz.el - 0.2

Published by alphapapa over 2 years ago

plz.el -

Published by alphapapa over 2 years ago

Package Rankings
Top 7.63% on Alpine-edge
Top 7.83% on Proxy.golang.org
Related Projects