changeset 572:b9420fb384f2

HttpFilterRequestWrapper - req.method
author Devel 1
date Wed, 27 Sep 2017 14:03:07 +0200
parents 7dcd63785b44
children 1fb90938c654
files stress-tester/src/main/java/com/passus/st/client/http/filter/HttpFilterRequestWrapper.java stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMessageWrapperTest.java
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpFilterRequestWrapper.java	Tue Sep 26 16:37:30 2017 +0200
+++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpFilterRequestWrapper.java	Wed Sep 27 14:03:07 2017 +0200
@@ -17,6 +17,10 @@
         super(message);
     }
 
+    public ByteString getMethod() {
+        return message.getMethod().getName();
+    }
+
     public URL getUrl() {
         if (url == null) {
             url = HELPER.getUrl(message);
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMessageWrapperTest.java	Tue Sep 26 16:37:30 2017 +0200
+++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMessageWrapperTest.java	Wed Sep 27 14:03:07 2017 +0200
@@ -75,6 +75,10 @@
         assertTrue(value instanceof ByteString);
         assertEquals("HTTP/1.1", value.toString());
 
+        e = bean("$req.method");
+        value = e.extract(wrapper);
+        assertEquals("GET", value.toString());
+
         e = bean("$req.version");
         value = e.extract(wrapper);
         assertEquals("HTTP/1.1", value.toString());