I'm doing a personal project with 3D printing and octoprint, in which I'm trying to retrieve values from the web interface such as the time left for the 3D print to be finished. I've done research and it seems that I have to do an HTTP GET Request. I have done research into the software of octoprint and found that they have an API documentation. Also, there is an API key to access my specific instance of octoprint. The problem I'm having is that I've never programmed anything with requests. I've done basic javascript, but nothing too advance. I'm looking for someone to guide me in the right direction in making a request and pulling values from the web interface. Thank you for your time.
HTTP GET Requests for Beginners - Octoprint
361 Views Asked by Mike At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Angular Show All When No Filter Is Supplied
- Why does a function show up as not defined
- I count the time the user takes to solve my quiz using Javascript but I want the same time displayed on another page
- Set "More" "Less" font size
- Using pagination on a table in AngularJS
- How to sort these using Javascript or Jquery Most effectively
- how to fill out the table with next values in array with one button
- State with different subviews
- Ajax jQuery firing multiple time display event for the same result
- Getting and passing MVC Model data to AngularJS controller
- Disable variable in eval
- javascript nested loops waiting for user input
- .hover() seems to overwrite .click()
- How to sort a multi-dimensional array by the second array in descending order?
- How do I find the fonts that are not loading in a CORS situation ( MoovWeb )?
Related Questions in NODE.JS
- How to solve CERT_UNTRUSTED error in nodemailer
- Run a loop over a callback, node js
- Implementing prerender.io middleware in sails.js
- Token based authorization in nodejs/ExpressJs and Angular(Single Page Application)
- formatting path string in javascript
- One to One screensharing using WEBRTC
- Create polygon from grid (for collisions)
- Strange npm behavior when installing packages like grunt
- Convert JSON.gz to JSON in node js
- "Your npm version is outdated." but it's not. While install yo
- Why put methods on the prototype of a class instead of declaring them in the constructor?
- Node JS Async Response
- mongoose get property from nested schema after `group`
- Cannot Receive Incoming call on Twilio android Client
- How can I change a specific line in a file with node js?
Related Questions in GET
- Invalid URL: No host supplied : error while using Request.get(url) in Python
- My get request for http is very slow
- Steam how to create new trade offer?
- Node.js http.get example
- How to change URL form with GET method?
- JAVA RMI get pass ArrayList element
- PHP switch with GET doesnt work after php upgrade
- Htaccess CSS not working
- Is it bad practice to dynamically create a variable from array to read a $_GET method in php
- Calling (non public) methods from overriden method
- How to be RESTful with long URLs?
- Java Junit Failure For an Attribute Class
- jquery get() method , how exactly does it work?
- How to Convert get LIST from MVC for using as Json
- How to load a page content in variable with jQuery
Related Questions in REQUEST
- Why does PHP add "\r\n" to an empty string?
- Superagent share session / cookie info with actual browser
- Check if POST is succesfull (Android)
- Python Web Scraping title in a special div & Page 1 + 15
- Pipe not working
- post request (with body) in node.js
- How do you Request[""] with a Dynamic Variable? Request["@Variable"]?
- No schema supplied and other errors with using requests.get()
- Send rest request after async responses volley
- Download The Images By Node(request)
- Get reponse message in Node using Request library?
- Android Java Http Request Post
- Can npm request module be used in a .pipe() stream?
- { [Error: socket hang up] code: 'ECONNRESET' }
- Spring MVC request
Related Questions in OCTOPRINT
- I am trying to write a python script to GET and POST to octoprint
- How to Nginx reverse proxy (proxy_pass) from inside Docker container to ouside (local network)
- Octoprint plugin development - dynamically generated "plugin settings page" + button click handle
- Raspberry Pi 3 B+ hamachi hostname issue
- Can't hit site with Traefik in Docker
- How can I prevent oom-kill without increasing RAM
- Configuring HAProxy in docker (503 Service Unavailable)
- ModuleNotFoundError: No module named 'apscheduler'
- Auto Run Script after power on - Raspberry Pi
- Installing Module wrapt says - ModuleNotFoundError: No module named 'wrapt'
- Raspberry Pi USB to serial - multiple ACM0 devices spawning
- Python command is not recognized anymore
- Uploading file with Octoprint API and GuzzleHttp
- HTTP GET Requests for Beginners - Octoprint
- Websocket not working with basic authentication on nginx-ingress
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Follow the documentation to retrieve your API key.
From here getting started with
fetchis the way to go. This is untested code for getting the API version but should be close:Here are some links to learn more about
fetch:https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch https://javascript.info/fetch https://medium.com/codingthesmartway-com-blog/fetch-api-introduction-to-promised-based-data-fetching-in-plain-javascript-620e54898d8e
Async functions are a related topic and another thing you'll want to learn.
https://developers.google.com/web/fundamentals/primers/async-functions