The URL you are trying to reach is not a valid end-point so the "The specified resource could not be found" is the expected response. If you trying to access the NiFi UI, the proper URL would be http://localhost:8081/nifi
If you are trying to get a response from one of NiFi's api end-points, you need to be very specific about which end-point you are trying to hit. The following link provides the syntax for NiFI rest-api endpoints that will return:
*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.