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
1 answer

Rust hyper HTTP(S) server to read/write arbitrary amount of bytes

I'm looking to build a basic HTTP(S) server using rust hyper, with the purpose of throughput measurement. Essentially it has two functions on GET request, send an infinite (or arbitrary large) stream of bytes. on POST, discard all incoming bytes,…
relet
  • 6,819
  • 2
  • 33
  • 41
0
votes
0 answers

How to proxy https with hyper-rustls?

I have implemented a reverse proxy with hyper-rustls and tokio. It works as intended when I use it against a non-https site, but when it hits a https host I get this from curl: curl: (52) Empty reply from server Structs #[derive(Serialize,…
0
votes
1 answer

Cannot use `form_urlencoded::Serializer` in `async` function

I have a hyper server set up more or less exactly as the third example here: https://docs.rs/hyper/0.14.16/hyper/server/index.html . My version of the handle function calls some other async functions, and everything works fine, until I try to encode…
BallpointBen
  • 9,406
  • 1
  • 32
  • 62
0
votes
1 answer

How do you change the start location for the hyper.is terminal on OSX

I don't understand the instructions on the hyper website. My understanding is that if I edit the ~/.hyper.js file then I can just update the "shell" field. But I don't know what to update in the field if I want the terminal to start on my desktop…
Josh Pittman
  • 7,024
  • 7
  • 38
  • 66
0
votes
1 answer

Sudo comands not working on hyper on windows 10

I'm doing this on a windows 10, without any VM software. I downloaded hyper and am using it to work with node and npm. On my laptop there's only 1 account(also the local account administrator). Despite this, I can't run most commands because I don't…
0
votes
1 answer

Rust Unit Test - Function call hangs at the very end and does not return

I am writing some unit tests for my Rust http server handlers. But when I am running one of the tests it get stuck at the end of the inner function. Here is relevant part of the code: async fn generate(request: Request) ->…
hagh
  • 507
  • 5
  • 13
0
votes
2 answers

How to manage high-throughput requests with computationally-intensive tasks in a Hyper/Axum webserver?

I have a case where I have an http server with axum that receive payload in a very high throughput (could get to 20m a second). I need to take those bytes from the request and do some heavy computations with them. The problem that the memory reach…
oronsh
  • 13
  • 3
0
votes
1 answer

Hyper client with tokio File stuck at write()

I am trying to do a full-async download attempt. The download works fine so far. Using std::fs::File it works fine but I wanted to try tokios File to make the code fully async. If I just download the file and let the data vanish, it works. But when…
Silberling
  • 160
  • 17
0
votes
1 answer

Can you build a hyper::Request from a String?

I'm trying to write an intercepting proxy. I originally used hyper as a server, as that was relatively straightforward, but if a request was malformed, hyper returned a response before I could pass the request on to the upstream server. I'd like to…
DevilToad
  • 97
  • 1
  • 7
0
votes
1 answer

"cannot infer an appropriate lifetime" when attempting to return a chunked response with hyper

I would like to return binary data in chunks of specific size. Here is a minimal example. I made a wrapper struct for hyper::Response to hold my data like status, status text, headers and the resource to return: pub struct Response<'a> { pub…
0
votes
1 answer

Tableau Hyperapi : Delete Row

I am trying to delete the first & last row with Java HyperAPI which i used to optimise big data into .hyper file. in tableau server. Im not sure if this possible but based on the documentation, some of the use cases i read , its possible based on…
Farid Arshad
  • 334
  • 2
  • 14
0
votes
0 answers

Hyper TLS cannot be run in Tokio Thread - Does not implement Send

In the server example provided by the HyperTLS library, the server provided cannot be run in a tokio::spawn() thread without throwing a litany of errors all stemming from the fact that: dyn futures_util::Stream
martinomburajr
  • 1,235
  • 14
  • 29
0
votes
1 answer

How to re-use a value from the outer scope inside a closure in Rust?

I am trying to add a webserver (hyper) in a small Rust program and I'm getting hit with a move issue. //main.rs // Suppose this is something meaningful and used in multiple places inside `main` let test: String = "Foo".to_string(); //…
rollingBalls
  • 1,808
  • 1
  • 14
  • 25
0
votes
0 answers

How to open a new tab in git bash?

I would like to open a new tab for git bash, like how you can open a new tab in hyper, so that MongoDB can run on one side and prompt can be open on one side. Unfortunately, I do not know how to do that, as there are no options for opening a new tab…
PreyZer
  • 51
  • 1
  • 10
0
votes
1 answer

Using socket2 with hyper

I am writing a http server that works with it's host machine via a unix domain sockets. The server is written using hyper and I am connecting to UDS via socket2. This is my code: let socket = Socket::new(Domain::UNIX, Type::STREAM, None)?; let…
metamemelord
  • 500
  • 1
  • 7
  • 19