Giter VIP home page Giter VIP logo

Comments (3)

erzk avatar erzk commented on June 18, 2024

Thanks for raising the issue.
I can't recreate this error. 400 error suggests that the server was down at that time. Have you tried it again?
Are you using the latest dev version (available on GitHub)?
Similar issue (#15) has been reported in the past but it should be fixed now.

from postcodesior.

jbl0ndie avatar jbl0ndie commented on June 18, 2024

Hi @erzk ,
Thanks for trying to recreate this. To the best of my knowledge, the issue is here:

bulk_postcode_lookup <- function(postcodes) {
check_list_limit(postcodes)
postcodes <- lapply(postcodes, URLencode)
r <- POST("https://api.postcodes.io/postcodes",
body = postcodes,
encode = "json")
extract_results(r)
}

If I replace lapply(postcodes, URLencode) with lapply(postcodes, paste0) I get the response as expected. I don't think the body needs URLencoding. I was going to make you a PR later today, if I get time.

from postcodesior.

erzk avatar erzk commented on June 18, 2024

Thanks for finding a solution. I'm not sure if removing URLencode is the best approach as the lack of it was causing issues in the past - see #14

from postcodesior.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.