@@ -404,6 +404,49 @@ module HTTP {
404
404
}
405
405
}
406
406
}
407
+
408
+ /** Provides classes for modeling HTTP clients. */
409
+ module Client {
410
+ /**
411
+ * A method call that makes an outgoing HTTP request.
412
+ *
413
+ * Extend this class to refine existing API models. If you want to model new APIs,
414
+ * extend `Request::Range` instead.
415
+ */
416
+ class Request extends MethodCall instanceof Request:: Range {
417
+ /** Gets a node which returns the body of the response */
418
+ DataFlow:: Node getResponseBody ( ) { result = super .getResponseBody ( ) }
419
+
420
+ /** Gets a string that identifies the framework used for this request. */
421
+ string getFramework ( ) { result = super .getFramework ( ) }
422
+ }
423
+
424
+ /** Provides a class for modeling new HTTP requests. */
425
+ module Request {
426
+ /**
427
+ * A method call that makes an outgoing HTTP request.
428
+ *
429
+ * Extend this class to model new APIs. If you want to refine existing API models,
430
+ * extend `Request` instead.
431
+ */
432
+ abstract class Range extends MethodCall {
433
+ /** Gets a node which returns the body of the response */
434
+ abstract DataFlow:: Node getResponseBody ( ) ;
435
+
436
+ /** Gets a string that identifies the framework used for this request. */
437
+ abstract string getFramework ( ) ;
438
+ }
439
+ }
440
+
441
+ /** The response body from an outgoing HTTP request, considered as a remote flow source */
442
+ private class RequestResponseBody extends RemoteFlowSource:: Range , DataFlow:: Node {
443
+ Request request ;
444
+
445
+ RequestResponseBody ( ) { this = request .getResponseBody ( ) }
446
+
447
+ override string getSourceType ( ) { result = request .getFramework ( ) }
448
+ }
449
+ }
407
450
}
408
451
409
452
/**
0 commit comments