Comments (3)
Hey @macomzzl does the CURL example work for you? It's hard to know how to help you without knowing exactly the request you're sending
from compiler.
@tzikis the CURL example is ok for me. But my application uses python to write. So I want to use python to post data to the compiler server.
Here is my test using python. And it doesn't work.
import urllib
import urllib2
json_data = {
'files':[{"content": "void setup()\n{\n pinMode(0, OUTPUT);\n}\n\nvoid loop()\n{\n digitalWrite(0,HIGH);\n\n}", "filename": "Arduino.ino"}],
'libraries':[], #key:[]
'format':"hex",
'version':'105',
'build':{
'mcu':'atmega328p',
'f_cpu':'16000000L',
'core':'arduino',
'variant':'standard'
}
}
url="http://the_url_of_your_compiler/authorizationKey/API_Version"
req = urllib2.Request(url)
print urllib.urlencode(json_data)
req.add_data(urllib.urlencode(json_data))
resp = urllib2.urlopen(req)
print resp.read()
from compiler.
I'm afraid I can't help since I don't know much about python. You'll need to find a way to see what kind of HTTP message your python script creates, vs the HTTP message the cURL command creates
I'll have to close this issue, since it isn't related to the project itself
from compiler.
Related Issues (8)
- General Documentation HOT 3
- [Insight] PHP code should follow PSR-1 basic coding standard - in Symfony/src/…/Handler/UtilityHandler.php, line 109 HOT 1
- Make the compiler compile Arduino 1.6 sketches HOT 5
- Create new install script for Arduino 1.6.0
- Server 404, Installation problem? HOT 10
- If an error occurs during an `exec` call, we get empty output
- Google Ending support for packaged apps HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compiler.