Blockstream / Blockstream/esplora

When getting API fee-estimates via wget or curl, sometimes get binary junk instead of json

Open
#209 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.3k
Forks
514
Avg merge
1d 10h
Merged PRs (30d)
16

Description

As per title, when fetching the fee-estimates API from https://blockstream.info/api/fee-estimates, using wget or curl (but not browser), it fails at apparently random times, producing binary gibberish instead of json output. See below for example:

>
> nanotube@gribble:~$ wget -O - https://blockstream.info/api/fee-estimates
> --2020-05-07 19:50:28-- https://blockstream.info/api/fee-estimates
> Resolving blockstream.info (blockstream.info)... 35.201.74.156
> Connecting to blockstream.info (blockstream.info)|35.201.74.156|:443... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 325 [application/json]
> Saving to: `STDOUT'
>
> 0% [ ] 0 --.-K/s {"12":56.102,"8":58.984,"2":75.447,"5":65.449,"11":58.84,"1":75.447,"9":58.84,"4":68.081,"13":43.924,"17":43.924,"25":41.793,"6":65.449,"14":43.924,"144":6.012,"504":6.012,"3":71.51,"20":41.793,"21":41.793,"19":43.924,"16":43.924,"10":58.84,"7":65.449,"15":43.924,"18":43.924,"22":41.793,"24":41100%[=========================================================================================================>] 325 --.-K/s in 0s
>
> 2020-05-07 19:50:28 (8.15 MB/s) - written to stdout [325/325]
>
> nanotube@gribble:~$ wget -O - https://blockstream.info/api/fee-estimates
> --2020-05-07 19:50:30-- https://blockstream.info/api/fee-estimates
> Resolving blockstream.info (blockstream.info)... 35.201.74.156
> Connecting to blockstream.info (blockstream.info)|35.201.74.156|:443... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 156 [application/json]
> Saving to: `STDOUT'
>
> 0% [ ] 0 --.-K/s M�A���@T�k���6�U����,>�F�uV�B�<�
> a:��B�V�8
> ���, ��.Ko��kRe+�͆�7����y�O]E��J>_�
> 100%[=========================================================================================================>] 156 --.-K/s in 0s
>
> 2020-05-07 19:50:30 (111 MB/s) - written to stdout [156/156]
>
> nanotube@gribble:~$

Steps to reproduce: try curl-ing or wget-ing the api point a few times.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.