I just executed your code with different URL https://reqres.in/api/users/2
and it's working for me.
My environment:
C:\>mvn -v
Apache Maven 3.6.3 ()
Maven home: C:\apache-maven\bin\..
Java version: 14.0.2, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-14.0.2
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Output:
C:\karateframeworktutorial-master-working>mvn clean test
[INFO] Scanning for projects...
[INFO]
[INFO] -------------< com.api.automation:karateframeworktutorial >-------------
[INFO] Building karateframeworktutorial 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ karateframeworktutorial ---
[INFO] Deleting C:\karateframeworktutorial-master-working\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ karateframeworktutorial ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\karateframeworktutorial-master-working\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ karateframeworktutorial ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ karateframeworktutorial ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ karateframeworktutorial ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to C:\karateframeworktutorial-master-working\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ karateframeworktutorial ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.api.automation.getrequest.TestGetRunner
12:53:38.712 [main] DEBUG com.intuit.karate.Suite - [config] classpath:karate-config.js
12:53:39.475 [main] INFO com.intuit.karate - karate.env system property was: null
12:53:39.742 [main] DEBUG com.intuit.karate - request:
1 > GET https://reqres.in/api/users/2
1 > Host: reqres.in
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.13 (Java/14.0.2)
1 > Accept-Encoding: gzip,deflate
12:53:40.054 [main] DEBUG com.intuit.karate - response time in milliseconds: 281
1 < 200
1 < Date: Thu, 22 Apr 2021 17:53:40 GMT
1 < Content-Type: application/json; charset=utf-8
1 < Transfer-Encoding: chunked
1 < Connection: keep-alive
1 < X-Powered-By: Express
1 < Access-Control-Allow-Origin: *
1 < Etag: W/"118-pbdwwFo9SKNhD3Lx5iHJyngpq00"
1 < Via: 1.1 vegur
1 < Cache-Control: max-age=14400
1 < CF-Cache-Status: HIT
1 < Age: 3340
1 < cf-request-id: 099c5065110000615851bba000000001
1 < Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
1 < Report-To: {"max_age":604800,"group":"cf-nel","endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=P4%2Bq0DOE555WKP3jOZmCrty4XBs1aCszh7CIoqXLwdtVCIIpFcKucIeRgq06UnrhrOmq%2FSCaMlhmAuZ%2BnYZoVPsV2cYjxUG1UpM%3D"}]}
1 < NEL: {"report_to":"cf-nel","max_age":604800}
1 < Vary: Accept-Encoding
1 < Server: cloudflare
1 < CF-RAY: 6440b681bf3f6158-ORD
1 < alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
1 < Set-Cookie: __cfduid=ddc5fe520d8c7faaa91efe44cc55007481619114020; Max-Age=1621706020000; Expires=Sat, 16 Feb 53411 08:20:20 GMT; Domain=reqres.in; Secure
{"data":{"last_name":"Weaver","id":2,"avatar":"https:\/\/reqres.in\/img\/faces\/2-image.jpg","first_name":"Janet","email":"janet.weaver@reqres.in"},"support":{"text":"To keep ReqRes free, contributions towards server costs are appreciated!","url":"https:\/\/reqres.in\/#support-heading"}}
---------------------------------------------------------
feature: classpath:com/api/automation/getrequest/getRequest.feature
scenarios: 1 | passed: 1 | failed: 0 | time: 0.5520
---------------------------------------------------------
Karate version: 1.0.1
======================================================
elapsed: 1.82 | threads: 1 | thread time: 0.55
features: 1 | skipped: 0 | efficiency: 0.30
scenarios: 1 | passed: 1 | failed: 0
======================================================
HTML report: (paste into browser to view) | Karate version: 1.0.1
file:///C:/karateframeworktutorial-master-working/target/karate-reports/karate-summary.html
===================================================================
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.317 s - in com.api.automation.getrequest.TestGetRunner
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.417 s
[INFO] Finished at: 2021-04-22T12:53:41-05:00
[INFO] ------------------------------------------------------------------------