November 2018
Intermediate to advanced
404 pages
10h 16m
English
Another tool is the curl command that you can use to make HTTP requests in the Terminal.
Run your helloWorld application for Vapor with curl:
$ curl "http://localhost:8080/student/Jane"
Here is the output you expected:
The student Jane's GPA is 3.91
When verbose mode is enabled with the -v flag, curl will give out more information on the HTTP request and response:
$ curl -v "http://localhost:8080/student/Jane"* Trying ::1...* TCP_NODELAY set* Connected to localhost (::1) port 8080 (#0)> GET /student/Jane HTTP/1.1> Host: localhost:8080> User-Agent: curl/7.55.1> Accept: */*>< HTTP/1.1 200 OK< content-type: text/plain; charset=utf-8< content-length: 30< date: Wed, 21 Nov 2018 06:46:44 GMT<* Connection ...
Read now
Unlock full access