Giter Club home page Giter Club logo

Comments (5)

emilk avatar emilk commented on May 31, 2024

Sounds good - PRs welcome!

from egui.

MathiasYde avatar MathiasYde commented on May 31, 2024

Are we going for a hard coded user agent or a configurable one? I could take a crack at it

from egui.

MathiasYde avatar MathiasYde commented on May 31, 2024

I've been looking through the code a bit and found out that egui-extras uses ehttp for the http ImageLoader which has hardcoded headers of just ("Accept", "*/*")

Do you want to simply pass the headers into ehttp::Request::get function, a builder pattern? (ehttp::Request::get("http://..").with_headers(..).build()) or perhaps something else?

from egui.

MathiasYde avatar MathiasYde commented on May 31, 2024

So a few hours of debugging and I found out that the URL I use to fetch images has unescaped qoutes ("\"https://..\"") which caused images to fail due to calling to_string() directly on serde_json::Value instead of something like as_str().unwrap_or("null").to_string() 🙃

from egui.

emilk avatar emilk commented on May 31, 2024

A hard-coded User-Agent: egui is a good start, but adding some way of changing it for EhttpLoader should be fairly easy.

from egui.

Related Issues (20)

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.