It is possible to build curved wires and rails.
For building there are 2 options, which both work the same.
Place the first rail/wire -> right click on it with the item -> place the second rail/wire -> the line between will be connected.
Place the first rail/wire and then second -> right click on the 1st rail/wire with the item and then on the 2nd -> the line between will be connected.