Let's say I connect a safe server example.com
.
In which case(s) can a malicious router in the middle of the route (or my ISP) see secret
?
1) HTTP + GET, secret in URL query parameter : http://example.com/mypage?user=abc&secret=238
2) HTTPS + GET, secret in URL query parameter : http://example.com/mypage?user=abc&secret=238
3) HTTP + POST, secret in request body:
user=abc&secret=238
4) HTTPS + POST, secret in request body:
user=abc&secret=238
?
I think it's true for 1), 3), but I'm unsure about 2).
I'm unsure because I've read that it's not best practice to pass such information via GET (even if HTTPS), but on the other hand, for many APIs, we have to pass auth tokens or api_key
via GET requests: https://apiexample.com/endpoint3?api_key=SQKDJHQJSD&action=do123.