-
Notifications
You must be signed in to change notification settings - Fork 310
feat: fetch interface final #1255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ae3d6e2
to
f1bc065
Compare
f1bc065
to
ab68e2e
Compare
ab68e2e
to
9d9409d
Compare
I'm thinking about moving all fetch related functions to the @stacks/network package. I think they would fit better semantically, since the network package already includes networking (endpoints etc. in addition to the blockchain-network specific constants). What do you think @zone117x ? |
9d9409d
to
b295474
Compare
Yep makes sense to me! |
b295474
to
03723d0
Compare
03723d0
to
c2746bc
Compare
c2746bc
to
789e8c4
Compare
Codecov Report
@@ Coverage Diff @@
## master #1255 +/- ##
==========================================
+ Coverage 64.49% 64.76% +0.27%
==========================================
Files 125 124 -1
Lines 8652 8702 +50
Branches 1859 1894 +35
==========================================
+ Hits 5580 5636 +56
+ Misses 2828 2815 -13
- Partials 244 251 +7
Continue to review full report at Codecov.
|
789e8c4
to
3832a29
Compare
3832a29
to
5de1500
Compare
5de1500
to
d0868c2
Compare
@janniks could we get some usage examples for a few common use cases added to readme(s), like tx broadcast on testnet and mainnet, fee estimate on testnet and mainnet, and also added to this PR desc? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff Jannik/Matt 👍🏼
121e11c
to
0afb23a
Compare
0afb23a
to
09ce910
Compare
09ce910
to
a0cc17e
Compare
a0cc17e
to
e76d6e9
Compare
I'll start adding more example/docs context to PR descriptions — great convention! |
e76d6e9
to
da32548
Compare
da32548
to
4af16a9
Compare
docs: optimize ts docs
4af16a9
to
12a40ae
Compare
cont'd changes
fetch
related functions to @stacks/commonexample usage
Using
createFetchFn
we can now build an alternative to the default built-in fetchFn of stacks.js. We can pass middlewares to the createFetchFn that will hook in before a request or after a response. ThecreateApiKeyMiddleware
function generates a new middleware that will add a custom header to each request.Middleware can be used to hook into network calls before sending a request or after receiving a response.