Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic http server to Dummy runtime #128

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

nieznanysprawiciel
Copy link
Contributor

@nieznanysprawiciel nieznanysprawiciel commented Sep 16, 2024

@nieznanysprawiciel nieznanysprawiciel force-pushed the dummy-http-server branch 2 times, most recently from 51f412b to fc63460 Compare September 16, 2024 17:10
);

tokio::time::sleep(info.sleep_time).await;
HttpResponse::Ok().body(vec![1; info.response_size as usize])
Copy link
Collaborator

@mwalkiewicz mwalkiewicz Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sleeping works, but generating response content doesn't work for me

$ curl -v 'http://localhost:7861/generate-traffic?sleepTime=1s&responseSize=1024'
*   Trying 127.0.0.1:7861...
* Connected to localhost (127.0.0.1) port 7861 (#0)
> GET /generate-traffic?sleepTime=1s&responseSize=1024 HTTP/1.1
> Host: localhost:7861
> User-Agent: curl/7.81.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< content-length: 0
< date: Tue, 17 Sep 2024 18:15:14 GMT
< 
* Connection #0 to host localhost left intact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants