I have a 1994 Toyota pickup truck 4 cyclender that acts up when I put on breaks on 1994 Toyota Pickup

when I put on the breaks the rpms starts to go up and do and does like it wants to kill.need help to find out what the problem may be

Asked by for the 1994 Toyota Pickup
Bad brak e switch, further testing required..