|
|
|
|
|
by harunurhan
3009 days ago
|
|
Maybe not the weirdest but; I was building the client library (wrapper) of an old external third party service we were running, for the our new system (re-write). By the way, this old third party supposedly has REST interface which was added later, when REST was getting popular. So I needed to get all ABCs but couldn't figure out how because there wasn't any `GET /abc` for ABC but `GET /abc/<id> on the docs. So I just checked how it was done in legacy code. Then I found a for loop 0 to 100 which was doing 100 `GET /abc/<index>`. It was working because ids were incremental and there were only less than 50 ABC records. Unfortunately there was no caching or `break;` after `404`. :( |
|