Comments (4)
Thanks for the error report, I've modified the source, now you can have a try.
from magpie.
@haifenghuang Thanks, now there is no error, but I have another question about httpclient.
Should httpclient return body?
In my case, http returns nothing:
magpie>> fn () {
... let response = http.get("http://github.com/")
... defer response.closeBody()
... let body = response.closeBody()
... println(body)
... }
...
magpie>>
or:
magpie>> fn getit() {
... let response = http.get("http://github.com/")
... defer response.closeBody()
... let body = response.closeBody()
... println(body)
... }
...
magpie>> getit()
nil
magpie>>
Maybe I doing something wrong.
from magpie.
I think your code:
let body = response.closeBody()
should be:
let body = response.readAll()
from magpie.
@haifenghuang Thanks
from magpie.
Related Issues (17)
- hash vivification not working HOT 15
- Question: have you planned to make Magpie compilable or bytecode? HOT 2
- Question: When do you want to implement interface, public, private, protected keywords? HOT 1
- [REPL Bug] stdin does not scans full string. HOT 1
- [REPL Bug] include errors ignoring. HOT 1
- How to check the typeof obj ? HOT 2
- Could Break to Label? HOT 1
- Is there go-routine feature? HOT 1
- howto get properties from json object HOT 2
- Hello HOT 1
- tcp的read方法阻塞 HOT 1
- idea: add namespace management HOT 6
- Please add multiline code blocks to the REPL. HOT 5
- I found a way to add support for highlight on Windows HOT 2
- Question: let keyword HOT 3
- Compilation succeed for Windows but failed for other platforms. HOT 12
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 magpie.