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

Struggling to call an async method from within a hyper request handler

I am struggling to build a web service using Hyper. The problem I face is best illustrated with with example code ... use std::convert::Infallible; use std::sync::Arc; use hyper::{Body, Request, Response, Server}; use…
Martin Cowie
  • 2,788
  • 7
  • 38
  • 74
0
votes
0 answers

How to save the Future object generated by hyper::Server::with_graceful_shutdown()?

When I was using the hyper server, I wanted to be able to shut it down gracefully. So I was using with_graceful_shutdown() to get a Future. The following code works fine. let signer = Arc::new(Notify::new()); let waiter = signer.clone(); …
progquester
  • 1,228
  • 14
  • 23
0
votes
0 answers

How to use OneDrive for Business files in Command Prompt or any other CLI like Hyper?

I am storing all my project files (JavaScript) in OneDrive for Business and trying to access them through Hyper CLI connecting to Node. However, when I access CLI, C:\ Drive is mapped by default and not able to access my project files stored in…
0
votes
1 answer

Why does my program get stuck at epoll_wait?

I have some structs that are used to de-serialize requests from GCP alerting. The top-level structs implement FromResponse, and the nested structs all implement serde's Deserialize and Serialize traits. Here are the structs (omitted ones that are…
0
votes
0 answers

how to open a command prompt(cmd) using bash script and pass arguments in windows

In Ubuntu i use gnome-terminal --window-with-profile=multi --command="bash -c 'cd ./backend && npm start'" In hyper terminal using hyper keyword it opens a terminal but how to pass command arguments. If above command --command="bash -c 'cd…
0
votes
1 answer

Return a hyper::Body of serde:Value

In my situation, my function can only have signature: pub async fn do_something(mut req: Request) -> Result, CustomError> { ..... } I know how to return a body of string in my function as…
Seeker
  • 75
  • 1
  • 5
0
votes
1 answer

How to open a file using Visual Studio Code in Hyper?

I am new to CLI and was trying to open a text file using Visual Studio Code $ start Visual Studio Code Text2.txt The result was The system cannot find the file Visual
0
votes
0 answers

How to parse paramemters in URL as a HashMap?

I have a client A and I am going to write a Proxy B to proxy some HTTPS/HTTP requests from A to C. B is just a proxy I don't care about what the parameters are. The parameters have be stored in the URL(not body),…
YNX
  • 511
  • 6
  • 17
0
votes
1 answer

NPM packages are not running with the node.js

Mysupername is the value that got printed out and not the expected output. I already tried reinstalling it. I used npm install prompt -sync to use it with JavaScript inside Visual Studio Code but I don't know where I am going wrong. I have already…
Ammad Ali
  • 19
  • 7
0
votes
2 answers

Does hyper client not accept self-signed certificates?

I have a web server built using hyper and tokio-rustls. When using the self-signed certificate, I have confirmed that the https request is successfully processed by a web browser such as Chrome. However, when I try to make a hyper client for the…
yjlee
  • 363
  • 1
  • 14
0
votes
1 answer

can't edit the preference of Hyper Terminal

I'm starting with Hyper terminal and want to edit the preferences. -when I click edit, then preferences, the notepad opens with the settings, it stays open for a few seconds then it closes automatically. I cannot edit/select/delete the text in it at…
Ahmad
  • 5
  • 3
0
votes
2 answers

.Parquet to .Hyper file conversion for any schema

I want to convert parquet file to hyper file format using python. There is the following git for this - https://github.com/tableau/hyper-api-samples/blob/main/Community-Supported/parquet-to-hyper/create_hyper_file_from_parquet.py. But in this case…
0
votes
1 answer

How to copy a file in node.js?

I'm learning Node.js and using the Hyper Terminal and Visual Studio Code. I want to copy a file through Hyper Terminal and notice that const fs = require("fs"); doesn't work in CommonJS. So I try to use the import like it says in Node.js docs. This…
0
votes
1 answer

fs.copyFileSync("file1.txt", "file2.txt"); throwing an error

const fs = require ('fs'); fs.copyFileSync("file1.txt", "file2.txt"); //when i try to run this code on hyper it gives this error Error: ENOENT: no such file or directory, copyfile 'file1.txt' -> 'file2.txt' ←[90m at Object.copyFileSync…
0
votes
0 answers

How do I write a generic function that executes a hyper service?

I have two similar functions which run an HTTP server. run_http_server1() compiles without errors, but run_http_server2() has a generic specification which I cannot declare correctly and so I get compilation errors. How do I declare the second…
Anon
  • 51
  • 3