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 {
190
190
result .hasUnderlyingType ( "@angular/common/http" , "HttpClient" )
191
191
}
192
192
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
+
193
196
private class AngularClientRequest extends ClientRequest:: Range , DataFlow:: MethodCallNode {
194
197
int argumentOffset ;
195
198
196
199
AngularClientRequest ( ) {
197
- this = httpClient ( ) .getAMethodCall ( "request" ) and argumentOffset = 1
200
+ this = httpClientApiNode ( ) .getMember ( "request" ) . getACall ( ) and argumentOffset = 1
198
201
or
199
- this = httpClient ( ) .getAMethodCall ( ) and
202
+ this = httpClientApiNode ( ) .getAMember ( ) . getACall ( ) and
200
203
not this .getMethodName ( ) = "request" and
201
204
argumentOffset = 0
202
205
}
You can’t perform that action at this time.
0 commit comments