Connections of SPST switch-ESE-11SV1
Here's the switch detail: -



You should use all four pins for mechanical rigidity and, as per the diagram both "C" pins are internally shorted on the switch and so are pins 1 and 2

Electrically you can use C and 1, or C and 2 - it doesn't matter. The switch (when closed) applies a short circuit between the left and the right pins.

I'd wire it into your MBED by having "common" down to 0V and, pin 1  to your IO pin. Your IO pin also needs a pull-up resistor to the Vcc on the MBED too. It could be between 1k and 100k.