Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic http #341

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Basic http #341

wants to merge 3 commits into from

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.

None yet

4 participants