Skip to content

PMHTTP v3.0.3

Compare
Choose a tag to compare
@lilyball lilyball released this 18 Aug 22:52
· 103 commits to master since this release
  • Add overloads to the request creation methods that take a URL. These overloads return a non-optional request.
  • Add new property HTTPManagerRequest.serverRequiresContentLength. This disables streaming body support (for JSON and multipart/mixed) and instead encodes the body synchronously so it can provide a "Content-Length" header to the server. There is a corresponding HTTPManager.defaultServerRequiresContentLength property as well.
  • Add a method HTTPManagerRequest.setDefaultEnvironmentalProperties() that sets properties to the HTTPManager-defined defaults that otherwise are only set if the request's path matches the environment. This is primarily intended for requests constructed using absolute paths (e.g. HTTP.request(GET: "/foo")) that should still use the environment defaults. Right now this method only sets auth and serverRequiresContentLength.