Coder Social home page Coder Social logo

Comments (7)

nitram509 avatar nitram509 commented on May 12, 2024

Hi,

I don't want to be the devil's advocate here, but I wonder, what's the use case?
Or, who uses it?

Regards
Martin

from freedomotic.

mcicolella avatar mcicolella commented on May 12, 2024

@nitram509 thanks for your answer. For example you could use a POST request in a plugin to publish on a cloud platform as ThingSpeak. Anyway the idea is to make the helper as general as possible with all the options for users.

from freedomotic.

bhdrkn avatar bhdrkn commented on May 12, 2024

Starting working on this. But this helper creating HttpClient for each request. It is not a good way to use, but i will keep it as it is. You may want to consider creating a refactoring issue.

from freedomotic.

mcicolella avatar mcicolella commented on May 12, 2024

There is already a pull request for this issue. Please check and verify it for any integration. Thanks

from freedomotic.

bhdrkn avatar bhdrkn commented on May 12, 2024

@mcicolella thanks for heads up. I checked the pull request and it does not contain post method. @nitram509 if you are not going to implement this, I am willing to do it. Please let me know.

from freedomotic.

nitram509 avatar nitram509 commented on May 12, 2024

@bhdrkn Feel free to go ahead with implementing POST.

To be honest, I don't see that much value in implementing a helper function, without any concrete need.
Please don't get me wrong here. I'm not against such helper functions in general, but without any concrete use case or scenario I simply don't know, how the method should look like and what are its responsibilities.

Regards
Martin

from freedomotic.

mcicolella avatar mcicolella commented on May 12, 2024

@nitram509 @bhdrkn We have some plugins to control domotic boards with an embedded webserver. Commands are sent as HTTP requests and the status (e.g. relais ON/OFF) is checked by parsing an XML file. Many times the webserver requires authentication.
The helper makes simpler to manage this tasks.

from freedomotic.

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.