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

log proper method #512

Merged
merged 3 commits into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/goose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,7 @@ impl GooseUser {
// POST request.
let goose_request = GooseRequest::builder()
.method(GooseMethod::Post)
.path(path)
Copy link
Member Author

Choose a reason for hiding this comment

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

We have to call .path(path) for consistent naming in the metrics, for this to work the same if you're using the builder directly.

.set_request_builder(reqwest_request_builder.body(body))
.build();

Expand Down Expand Up @@ -1290,6 +1291,7 @@ impl GooseUser {
// POST form request.
let goose_request = GooseRequest::builder()
.method(GooseMethod::Post)
.path(path)
.set_request_builder(reqwest_request_builder.form(&form))
.build();

Expand Down Expand Up @@ -1338,6 +1340,7 @@ impl GooseUser {
// POST json request.
let goose_request = GooseRequest::builder()
.method(GooseMethod::Post)
.path(path)
.set_request_builder(reqwest_request_builder.json(&json))
.build();

Expand Down Expand Up @@ -1572,7 +1575,7 @@ impl GooseUser {

// Record the complete client request, included in the request log and the debug log.
let raw_request = GooseRawRequest::new(
request.method.clone(),
goose_method_from_method(built_request.method().clone())?,
built_request.url().as_str(),
headers,
body,
Expand Down
Loading