jabranr/postcodes-io

Possibly incorrect parameter order

jamieburchell opened this issue · 2 comments

I think random should be after %s here?

sprintf('/random/%s', static::API_POSTCODES_ENDPOINT)

Hey @jabranr I apologise - I misunderstood that the end result should have been /random/postcodes after all so this wasn't an issue in the first place :/

@jamieburchell No worries. However, I found that %s substitution was adding an extra / because the value of constant API_POSTCODES_ENDPOINT is /postcodes – so I have changed it from /random/%s to /random%s.