promise
Version, currently 1.0.02 versions
- 2.0.0latestApr 23, 2020
- 1.0.0not indexedApr 23, 2020
github.com/jwaldrip/promise.cr
A Promise Implementation in Crystal.
32 stars
0 dependents
License: MIT
Nothing has been indexed for 1.0.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
promise:
github: jwaldrip/promise.cr
version: ~> 1.0.0Then run:
shards installshard.yml
No shard.yml has been indexed for 1.0.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
# Promise.cr [](https://travis-ci.org/jwaldrip/promise.cr) [](https://github.com/jwaldrip/promise.cr/releases) [](https://jwaldrip.github.com/promise.cr)
A Promise Implementation in Crystal.
## Installation
Add `promise` to the shard.yml file as a dependency.
```yml
# shard.yml
dependencies:
promise:
github: jwaldrip/promise.cr
tag: {desired_tag}
```
## Usage
```crystal
require "promise"
require "http/client"
require "json"
def read_body(response : HTTP::Client::Response) : String
response.body
end
request = Promise(HTTP::Client::Response | JSON::Any).execute do |resolve|
HTTP::Client.get "https://httpbin.org/user-agent"
end
puts "do something else...."
request.then do |response|
JSON.parse(read_body(response as HTTP::Client::Response))
end.catch do |ex|
puts "caught!"
puts ex.message
end.then do |json_hash|
puts json_hash
end.await
```
## Documentation
You can generate docs using `crystal doc` on your local machine,
or visit: https://jwaldrip.github.com/promise-cr to view the current version's
documentation.
## Contributing
See [CONTRIBUTING](/CONTRIBUTING.md)
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.0.0- Tagged
- Apr 23, 2020
- Commit
2b1e852dc154- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/jwaldrip/promise.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 12, 2026
- Versions
- 2