File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
javascript/ql/lib/semmle/javascript/frameworks Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -190,13 +190,16 @@ module Angular2 {
190190 result .hasUnderlyingType ( "@angular/common/http" , "HttpClient" )
191191 }
192192
193+ /** Gets a reference to an `HttpClient` object using the API graph. */
194+ API:: Node httpClientApiNode ( ) { result = API:: Node:: ofType ( "@angular/common/http" , "HttpClient" ) }
195+
193196 private class AngularClientRequest extends ClientRequest:: Range , DataFlow:: MethodCallNode {
194197 int argumentOffset ;
195198
196199 AngularClientRequest ( ) {
197- this = httpClient ( ) .getAMethodCall ( "request" ) and argumentOffset = 1
200+ this = httpClientApiNode ( ) .getMember ( "request" ) . getACall ( ) and argumentOffset = 1
198201 or
199- this = httpClient ( ) .getAMethodCall ( ) and
202+ this = httpClientApiNode ( ) .getAMember ( ) . getACall ( ) and
200203 not this .getMethodName ( ) = "request" and
201204 argumentOffset = 0
202205 }
You can’t perform that action at this time.
0 commit comments