HttpDo | Lightweight package providing you with means to host | Runtime Evironment library
kandi X-RAY | HttpDo Summary
kandi X-RAY | HttpDo Summary
HttpDo is a lightweight package that allows you to host a web interface (website with buttons and inputs) that can execute methods and display data of a connected app.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of HttpDo
HttpDo Key Features
HttpDo Examples and Code Snippets
Community Discussions
Trending Discussions on HttpDo
QUESTION
I am trying to load in an XML file saved locally on my computer using the loadXML()
function in p5.js, and then using the httpPost()
function to POST the same to a server which expects an XML file through the following code:
ANSWER
Answered 2018-Aug-21 at 22:14If I were you I would try to get something simpler working. Can you get this working with a more basic piece of XML? Can you hard-code the XML and see if that works?
If you google your error "Converting circular structure to JSON at JSON.stringify"
you'll get a ton of results. Basically you can't convert an object to JSON if it contains circular references.
Then looking at the P5.js reference, you'll notice that the p5.XML
type contains a circular reference with its getParent()
function.
This is the cause of your error: the httpPost()
function is trying to convert your XML into JSON, which it can't do because it contains a circular reference.
To fix your problem, you have a few options:
- Track down why the
httpPost()
function is converting XML to JSON. This smells like a bug, so I'd do some more debugging to figure out what's going on. - You could convert your XML into a string. The
getContent()
function might help here. - You could load your XML as text or as bytes instead of loading it as XML.
The above are just guesses because I can't actually run your code, but hopefully this gets you unblocked. Good luck.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install HttpDo
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page