Questions tagged [hyper]

A fast and correct HTTP implementation for Rust.

Hyper is a fast, safe HTTP implementation written in and for Rust.

  • A Client for talking to web services.
  • A Server for building those web services.
  • Blazing fast* thanks to Rust.
  • High concurrency with non-blocking sockets.
  • HTTP/1 and HTTP/2 support.

Github Repository

Guide

256 questions
0
votes
0 answers

Oh my zsh theme color not showing as in screenshots

I'm using zsh with ohmyzsh in windows 10 with Hyper (using ubuntu bash). But when I use the "ls" command the colors of the output are horrible. Nothing similar to the screenshots of the theme I'm using "af-magic". Why is that happening? How could I…
nardoyala
  • 77
  • 2
  • 10
0
votes
1 answer

Conditionally Use ProxyConnector or HTTPConnector

I want to make an HTTP request using the hyper crate. If the user has provided the proxy settings, the request must go through the proxy, otherwise the request will be sent without the proxy. Here is my approach: - use hyper::Client; use…
0
votes
0 answers

Specify lifetime of variable for the time of the HTTP request

I'm trying to implement an HTTP layer on top of RocksDB as a toy project. My idea was to create an endpoint which returns a "never-ending" stream of data which is finished when client closes connection. I need the lifetime of a variable to last as…
MaC
  • 529
  • 7
  • 14
0
votes
1 answer

React Native App Atom IDE error not allowing to create config folder

I keep getting this error message when I try to create a "config" folder for my Firebase API code inside Atom and even in Visual Studio Code. Error: EACCES: permission denied, mkdir…
Lou
  • 67
  • 1
  • 8
0
votes
1 answer

How do I add multiple RPC endpoints using hyper?

I want to create multiple RPC methods using hyper. This is their example code. How do I add multiple methods and start the service which returns a BoxFuture? Below, I have two methods, how do I merge the two methods and create the service? use…
nagaraj
  • 797
  • 1
  • 6
  • 29
0
votes
1 answer

New Tokio + dependency with older hyper

I am using tokio 0.2.x but I need to use a dependency that depends on hyper 0.12.35. This result in SpawnError { is_shutdown: true } panics. I have managed to reproduce this in an isolated manner: cargo.toml [dependencies] tokio = { version =…
Juan Leni
  • 6,982
  • 5
  • 55
  • 87
0
votes
1 answer

How to unblock a future thread and return results

I decided to use the hyper create to build a server that reads the body data of a POST method. How do I synchronously return a value calculated in an asynchronous Future in stable Rust? explains a part of what I am looking for, but I don't want to…
Silva
  • 625
  • 1
  • 6
  • 25
0
votes
0 answers

HTTP2 requests and Hyper

I've spent a few hours too much today trying to get Python requests + hyper working. I've managed to log onto the drupal site (need to automate some things), but it seems that due to HTTP2 only used on the server, and hyper not being at mature…
Balkyto
  • 1,460
  • 4
  • 22
  • 47
0
votes
0 answers

Trying to make my bash client automatically go to specific folder

I want to be able to open the embedded terminal in vscode and have it automatically go to the correct directory. But also, if I open git bash just by itself, I want it to automatically go to D:\Coding , is this possible? I tried setting up a bashrc…
0
votes
2 answers

R: Detect frequency

I have to create a function (or loop) in R to detect hyper-frequent. The requirement to detect hyper-frequent is to come 3 times in 180 days, if that requirement is met the person will be hyper-frequent, not only in the future, but in the past…
Anne
  • 109
  • 5
0
votes
1 answer

Channel communication between tasks

I am trying to set up a channel based communication between one hyper service and one tokio stream. The problem is that the compiler rants with the following error: closure is FnOnce because it moves the variable tx_queue out of its…
Jérôme R
  • 1,227
  • 2
  • 13
  • 23
0
votes
1 answer

Not able to install lotion via npm

i tried doing this in hyper But i got following error npm ERR! errno 1 npm ERR! tendermint-node@3.5.0 preinstall: 'rm -f ./bin/tendermint && touch ./bin/tendermint'> npm ERR! exit status 1> npm ERR! npm ERR!…
0
votes
1 answer

I am trying to create an http2 multiclient server using python hyper library. It completes only the first request

I am able to serve http2 using this tutorial. https://python-hyper.org/projects/h2/en/stable/basic-usage.html. This version works fine. But this server is able to serve only one client in a time, becouse of the blocking sockets. Then I looked for…
user3598726
  • 951
  • 2
  • 11
  • 27
0
votes
1 answer

Nested closure borrow failed

I want to parse a YAML file and use the value inside a service for a HTTP request. Line 35 is the end of main function. extern crate hyper; extern crate libc; extern crate yaml_rust; use hyper::rt::Future; use hyper::service::service_fn_ok; use…
Abdillah
  • 982
  • 11
  • 28
0
votes
1 answer

Is it possible to have Future::and_then conditionally return different futures?

In this simplified version of my code, I would like to sometimes execute the marked line and sometimes not, maybe returning an error instead: extern crate futures; // 0.1.26 extern crate hyper; // 0.12.25 use hyper::rt::{Future, Stream}; use…