fogfish / gurl Goto Github PK
View Code? Open in Web Editor NEWᵍ🆄🆁🅻 is a combinator library for network I/O
License: MIT License
ᵍ🆄🆁🅻 is a combinator library for network I/O
License: MIT License
Existing matcher is only designed to support Object as the root level entity.
ƒ.Match(`[ ... ]`)
ƒ.Match(`"..."`)
ƒ.Match(100)
would fail
As a developer
I want to log HTTP requests
So that it is possible to debug or trace communication with remote entity
The debug level is required to
gurl.HTTP(
ø.POST("/auth/token"),
ø.ContentForm(),
ø.Send("grant_type=authorization_code&code="+code),
ƒ.Code(200),
...
fails with error
json: cannot unmarshal string into Go value of type map[string]string
ø.Send
supports only structured input
...
ƒ.Bytes(&x),
ƒ.Value(&x).String("xxx"),
...
String fails to compare byte with string. It requires
...
ƒ.Bytes(&x),
ƒ.Value(&x).Bytes([]byte{"xxx"}),
...
The following code snippet fails with null pointer
type A struct {
V string `json:"a"`
}
type B struct {
A *A `json:"b"`
}
val := B{}
http.Join(
ø.GET("http://example/%s", &val.A.V),
...
Here is classical cases: pointer of pointer. The construct &val.A.V
always points to last value but intermediate A
is not initialised yet.
args
needs to be escaped.
func GET(uri string, args ...interface{}) gurl.Arrow {
return URL("GET", fmt.Sprintf(uri, args...))
}
Is the data pointer a right format to define state
[m_state ||
Token <- access_token(),
User <- user(Token),
Org <- org(Token, User)
].
ø.GET.URL("%s/%s/%d/levels/%f", ø.Authority(host), valString, valInt, valFloat)
It fails with
invalid URL escape "%!f"
Existing implementation has dependency to IO Stack. The Context pattern is a right abstraction of this type.
Make it as a context simplifies API.
Usage of ø.GET.URL
becomes difficult to understand when ! symbol is used. It is not obvious when api makes escaping when not. The ø.GET.URL
should support following use-case:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.