NodeMCU-V1 with RX/TX configured as GPIO and WiFi

Hello everyone,

I have configured the RX and TX pins of my NodeMCU-V1 in the setup() as follows:

  pinMode(1, FUNCTION_3);
  pinMode(3, FUNCTION_3);

Now I want to use these pins as GPIO and use WiFi to do an HTTP-request.
However only when the RX/TX pins are configured as GPIO, the WiFi does not connect.

I've tried this with several libraries:
ESP8266WiFi
WiFiManager

It does not matter which library I am using, the WiFi will not connect and fail the HTTP-request.

I've tested this with a motor connected to the RX/TX pins that responds on the HTTP-request. (Since Serial does obviously not work).

Can somebody help me with this maybe?

Thank you,
Terick