Can you be given antibiotics orally during labour?

Just curious, I had GBS with my first so I was given antibiotics via IV during labour, but I never thought of it until tonight.. usually in all other cases in life of needing antibiotics they are given orally so is that possible during birth or no? Anyone know why they’re given through IV during labour instead of orally?