Code Monkey home page Code Monkey logo

Comments (3)

maanlamp avatar maanlamp commented on September 6, 2024

@jeroentvb Thanks for the issue!

You said:

An id for this endpoint would look like this |oba-catalogus|1201384, the problem however is that the | gets parsed to %7C which causes an error.

This is because the pipe character (|) is not a safe url character. Everything that gets sent through the url (the id in this case), will be URLEncoded. I'm debating whether I'll allow it in the url, or just make everyone use the frabl :)

pagesize=1&refine=false are given to any built url by default. But those parameters aren't known by the /availability endpoint, so it causes an error.

This is interesting. Since I hadn't tested the availability endpoint, I didn't know this would happen. I will definitely fix this asap.

I would suggest checking what endpoint is used and applying those parameters accordingly.

Yep :)

Sidenote: why are you setting refine=false on every normal /search? I thought refine=true returned extra info about the search results.

That code is for a ping to the server, with which I'm looking at how many results there are to get, and to get the request context. Setting refine=true on a ping will slow it down, while a ping is supposed to be very minimal in payload and time footprint. The actual request has no set refine, so you can set that yourself.

I believe it fails because json.aquabrowser.meta.count doesn't exist in the response of the /availability endpoint.

Right, another side-effect of my lack of testing. Thanks for looking into it -- I'm fairly sure you are right.

from oba-wrapper.

jeroentvb avatar jeroentvb commented on September 6, 2024

I'm debating whether I'll allow it in the url, or just make everyone use the frabl :)

I would make everybody use the frabl, since as you said, the pipe character isn't url safe and it's required to use the id as far as I know.

That code is for a ping to the server, with which I'm looking at how many results there are to get, and to get the request context. Setting refine=true on a ping will slow it down, while a ping is supposed to be very minimal in payload and time footprint. The actual request has no set refine, so you can set that yourself.

Aha, makes sense.

from oba-wrapper.

maanlamp avatar maanlamp commented on September 6, 2024

After fooling around in the code, the simplest solution I came up with is in f976c78.

Sorry you have to use a custom method that doesn't make use of the stream etc. This "just works™️". Maybe I'll revisit this later for a cleaner solution.

from oba-wrapper.

Related Issues (9)

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.