cro-http-pushpromise

Cro::HTTP::PushPromise

A Cro::HTTP::PushPromise is a subclass of Cro::HTTP::Request. In a server context, it will be processed just like a request, the only difference being that the "request" originated on the server as a result of a response having one or more push promises. In a client context, it represents what was promised, and provides asynchronous access to the response that fulfils the push promise.

Getting the promised response

The response method returns a Raku Promise that will be Kept with a Cro::HTTP::Response object when the promised response is delivered. Should that not be possible for some reason, then the Promise will be broken.

This will typically only be applicable in a client context, however the Promise will be Kept in a server context also.

Setting the promised response

The response can be set by calling the set-response method; this keeps the Promise that has been, or will be, returned by response. Note that this will typically only be done by Cro internals.

cro v0.8.8

Libraries and tools for building reactive services in Raku. This installs the cro command line and web tool, along with HTTP (including HTTPS and HTTP/2.0) and WebSocket support.

Authors

  • Jonathan Worthington

License

Artistic-2.0

Dependencies

IO::Socket::Async::SSLJSON::FastMETA6Shell::CommandFile::FindTerminal::ANSIColorOO::MonitorsYAMLishCro::WebSocket:ver<0.8.8>Docker::FileFile::Ignore

Test Dependencies

Provides

  • Cro::Tools::CLI
  • Cro::Tools::CroFile
  • Cro::Tools::Link::Editor
  • Cro::Tools::LinkTemplate
  • Cro::Tools::LinkTemplate::HTTP
  • Cro::Tools::LinkTemplate::HTTPS
  • Cro::Tools::LinkTemplate::WS
  • Cro::Tools::LinkTemplate::WSS
  • Cro::Tools::Runner
  • Cro::Tools::Serve
  • Cro::Tools::Services
  • Cro::Tools::Template
  • Cro::Tools::Template::Common
  • Cro::Tools::Template::HTTPService
  • Cro::Tools::Template::ReactReduxSPA
  • Cro::Tools::Template::ZeroMQWorkSinkService
  • Cro::Tools::Template::ZeroMQWorkerService
  • Cro::Tools::TemplateLocator
  • Cro::Tools::Web

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.