Chapter 1: Invalid text shown on Browser

When i run the app LittleJohn with Swift run and go to the url localhost:8080/hello here is the response i got in the browser

Screenshot 2024-04-19 at 12.32.06 PM
See at the end there are unnecessary text. I haven’t changed anything on the code. Even i tried to log the date before it converted to data inside response and that date is printed properly.

  1. Try to check the code in your environment matches that of the book.
  2. Try the following command and reply with what you get: ```
    curl -v http://localhost:8080/hello

Hey @robertomachorro the curl command returning the correct result, issue is only with the browser.

Please reply with the response, this is more about the format and headers than the output of the command. The application is doing what it’s supposed to do, I’m just helping you get the message right to the server.

Hey sorry for the late response, here are the screenshots

Please add the -v parameter (verbosity) as per my prior message. Thanks!