-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
added TestServer::client_headers
#2097
Merged
robjtede
merged 6 commits into
actix:master
from
sfisol:feature/test_websocket_with_config
Apr 1, 2021
Merged
added TestServer::client_headers
#2097
robjtede
merged 6 commits into
actix:master
from
sfisol:feature/test_websocket_with_config
Apr 1, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sfisol
force-pushed
the
feature/test_websocket_with_config
branch
from
March 20, 2021 09:53
8ff6829
to
a3bc8c7
Compare
robjtede
added
A-test-server
project: test-server
A-web
project: actix-web
B-semver-minor
labels
Mar 20, 2021
sfisol
force-pushed
the
feature/test_websocket_with_config
branch
3 times, most recently
from
March 25, 2021 09:03
72949a2
to
0d451d2
Compare
robjtede
changed the title
added TestServer::ws_at_with_config
added Mar 25, 2021
TestServer::ws_at_with_config
robjtede
reviewed
Mar 25, 2021
robjtede
reviewed
Mar 25, 2021
robjtede
reviewed
Mar 25, 2021
It would be better to just expose headers field from |
sfisol
force-pushed
the
feature/test_websocket_with_config
branch
from
March 25, 2021 09:56
0d451d2
to
820fb4c
Compare
sfisol
force-pushed
the
feature/test_websocket_with_config
branch
from
March 31, 2021 09:51
820fb4c
to
013b975
Compare
sfisol
changed the title
added
added Mar 31, 2021
TestServer::ws_at_with_config
TestServer::client_headers
I rebased on #2114 and amended my changes to use mutable headers in TestServer's client. |
robjtede
approved these changes
Mar 31, 2021
sfisol
force-pushed
the
feature/test_websocket_with_config
branch
from
March 31, 2021 17:39
228b073
to
b1ab4fe
Compare
@robjtede I've amended your last commit because somehow HeaderMap was still not imported. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Type
Feature (used in testing)
PR Checklist
Overview
TestServer methods
.ws()
and.ws_at()
disallow any altering of request they perform.This PR adds.ws_at_with_config()
method that takes a closure used for configuring the request.This PR adds
TestServer::client_headers
method that exposes mutable headers of client used to perform requests. This allows to add custom headers.For example, this allows to add authorization headers if WebSocket handler needs it.
Changes were added to both
actix-web/src/test.rs
andactix-http-test/src/lib.rs
files