Skip to content

Commit

Permalink
[bidi][java] Use enum for HttpMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
pujagani committed Mar 18, 2024
1 parent 41e6384 commit 5f98528
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -17,6 +17,8 @@

package org.openqa.selenium.bidi.network;

import org.openqa.selenium.remote.http.HttpMethod;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -48,8 +50,8 @@ public ContinueRequestParameters headers(List<Header> headers) {
return this;
}

public ContinueRequestParameters method(String method) {
map.put("method", method);
public ContinueRequestParameters method(HttpMethod method) {
map.put("method", method.toString());
return this;
}

Expand Down

2 comments on commit 5f98528

@joerg1985
Copy link
Member

Choose a reason for hiding this comment

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

@pujagani org.openqa.selenium.remote.http.HttpMethod does not cover all cases, e.g. HEAD, CONNECT, TRACE.

Kind regards
Jörg

@pujagani
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for pointing that out. I will add those to the enum.

Please sign in to comment.