Show HN: Pipe To Me – Stream data over HTTP using curl
1–10 of 14 posts
Re: Show HN: Pipe To Me – Stream data over HTTP using curl
#2pipefrom() { local key=${1:?"Error: Missing pipe key"}; curl -s https://pipeto.me/$key; }
pipeto() { local key=${1:?"Error: Missing pipe key"}; curl -T- -s https://pipeto.me/$key; }
Re: Show HN: Pipe To Me – Stream data over HTTP using curl
#3Re: Show HN: Pipe To Me – Stream data over HTTP using curl
#4Would there be no way for the server to indicate over HTTP to curl that it is not ready to receive until the receiver has connected? Then curl might be able to wait until it reads from the pipe.
I also toyed around with using the "-T." curl argument instead of "-T-" to allow some response in this case, but I came up against a known issue in curl (https://github.com/curl/curl/issues/932). I'm sure this wasn't the intended use case though.
It is definitely worth exploring further.
Re: Show HN: Pipe To Me – Stream data over HTTP using curl
#5Would there be no way for the server to indicate over HTTP to curl that it is not ready to receive until the receiver has connected? Then curl might be able to wait until it reads from the pipe.
The HTTP request header Expect: 100-Continue and HTTP response status 100 Continue informs the client that the server desires to receive the request body.
However, many servers don't support it, and curl proceeds anyway if there is no Continue response after 1000ms. This timeout was originally fixed [1], but since curl 7.47.0 can be adjusted via --expect100-timeout.
Re: Show HN: Pipe To Me – Stream data over HTTP using curl
#6Re: Show HN: Pipe To Me – Stream data over HTTP using curl
#7how does it update without javascript?
Re: Show HN: Pipe To Me – Stream data over HTTP using curl
#8Would there be no way for the server to indicate over HTTP to curl that it is not ready to receive until the receiver has connected? Then curl might be able to wait until it reads from the pipe.
Hello, Author here. I toyed around with the idea of not allowing the sender to connect until a receiver was connected, but I could see the use case where you wrote a stream to nowhere and then had receivers jump in and out. I also toyed around with using the "-T." curl argument instead of "-T-" to allow some response in this case, but I came up against a known issue in curl ( https://github.com/curl/curl/issues/932 )…
Re: Show HN: Pipe To Me – Stream data over HTTP using curl
#9Re: Show HN: Pipe To Me – Stream data over HTTP using curl
#10Earlier quoted context omitted.
Hello, Author here. I toyed around with the idea of not allowing the sender to connect until a receiver was connected, but I could see the use case where you wrote a stream to nowhere and then had receivers jump in and out. I also toyed around with using the "-T." curl argument instead of "-T-" to allow some response in this case, but I came up against a known issue in curl ( https://github.com/curl/curl/issues/932 )…
That is interesting. What made you stay away from returning an error if someone tries to post without a receiver?
It would probably also make more sense if I were to add some kind of buffering or storage in the future.