Comments (7)
Hi, @leopku, you can try to add by yourself something like this:
- To pkg/stdlib/types file to_binary.go with function
func ToBinary(ctx context.Context, args ...core.Value) (core.Value, error) {
err := core.ValidateArgs(args, 1, 1)
if err != nil {
return values.None, err
}
val := args[0].String()
return values.NewBinary([]byte(val)), nil
}
-
To pkg/stdlib/types/tib.go add raw to RegisterLib func
"TO_BINARY": ToBinary,
-
In your script use
`Let binaryBody = to_binary('"id"=15')
LET result = IO::NET::HTTP::POST({url: "https://httpbin.org/post",
body: binaryBody,
headers: {"Content-Type": "application/json"}
})
`
The reason of this error is absence of to_binary in ferret
from ferret.
Hello!
You can use to_binary function:
Let binaryBody = to_binary('"id"=15')
Hope it helps,
Natalia
from ferret.
Does not work:
compile query: not found: function: 'TO_BINARY'
from ferret.
@errshoff didn't you try to pass req
instead of JSON_STRINGIFY(req)
?
from ferret.
@3timeslazy I tried. The result is the same:
invalid type: expected [binary], but got object
from ferret.
Same issue. not found: function: 'TO_BINARY'
@errshoff , should you plz sharing how did you fixed it?
from ferret.
@Gusyatnikova thanks a lot.
from ferret.
Related Issues (20)
- Nodejs bindings
- Ferret requests are concurrent or sequential HOT 1
- Ternary operator
- Default headers in http driver
- Variable in LIMIT clause
- xpath processor is broken
- DATE not parsing rfc3339 correctly HOT 1
- Error if element not found
- Introduce runtime interface for value conversions HOT 1
- How to capture HEADERS from response? (filename) HOT 2
- Unable to select drop down HOT 2
- Installation documentation is incorrect HOT 7
- Worker and Cli to v0.16.7 HOT 6
- fatal error: unexpected signal during runtime execution, fresh install 🤷♂️ HOT 4
- How to access cdp.Driver.client HOT 1
- Add support to parse files on local file system. HOT 1
- Bypass cloudflare HOT 3
- Document is no longer available (null) after submitting a form HOT 4
- how run furret in windows?
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 ferret.