Skip to content

Conversation

@0xor1
Copy link

@0xor1 0xor1 commented Jul 27, 2021

adding the basic http client with byte limiting, doesn't allow for streaming requests, but should be good enough for most use cases.
this is the matching change on the dry-er arg type checking.

basic usage:

fmt := import("fmt")
http := import("http")

res := http.do("GET", "http://example.test", {"my-header": "why not"}, bytes("this is the body"))

fmt.println(res.code == 200) // true
fmt.println(res.status == "200 OK") // true
fmt.println(len(res.headers) > 0) // map, true
fmt.println(len(res.body) > 0) // bytes, true

@0xor1
Copy link
Author

0xor1 commented Jul 27, 2021

looks like it's failing because it's using go 1.13, I developed in go 1.16 any reason the project go version isn't keeping with latest go?

@geseq
Copy link
Collaborator

geseq commented Sep 5, 2021

Unless we’re releasing a new major version I’d prefer this be backwards compatible with older Go versions, at least to a version or two before the current version at the time of the 2.0 release of tengo.

Copy link

@raifpy raifpy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

@tmm1
Copy link
Contributor

tmm1 commented Mar 27, 2023

can this be updated and merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants