Skip to content

Commit 84fdd8a

Browse files
committed
Python: Add non-deprecated httpVerb to Concepts
1 parent 5a032d6 commit 84fdd8a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

python/ql/lib/semmle/python/Concepts.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,11 @@ class RegexEscaping extends Escaping {
534534

535535
/** Provides classes for modeling HTTP-related APIs. */
536536
module HTTP {
537-
import semmle.python.web.HttpConstants
537+
/** Gets an HTTP verb, in upper case */
538+
string httpVerb() { result in ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"] }
539+
540+
/** Gets an HTTP verb, in lower case */
541+
string httpVerbLower() { result = httpVerb().toLowerCase() }
538542

539543
/** Provides classes for modeling HTTP servers. */
540544
module Server {

0 commit comments

Comments
 (0)