Skip to content
http module for starlark-go
Go Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/nethttp
BUILD.bazel
LICENSE
README.md
WORKSPACE
delete.go
delete_test.go
do.go
do_test.go
get.go
get_test.go
module.go
module_test.go
patch.go
patch_test.go
post.go
post_test.go
put.go
put_test.go
request.go
request_test.go
response.go
response_test.go

README.md

starlark-go-nethttp

A wrapper around a minimal subset of net/http package for use within starlark-go.

Documentation

Getting started

Build the code:

# check out the code and dependencies,
# and install interpreter in $GOPATH/bin
$ go get -u github.com/pcj/starlark-go-nethttp

Run the interpreter or interact with the read-eval-print loop (REPL):

$ nethttp
>>> resp = http.get("https://google.com")
>>> resp.code
200
>>>

When you have finished, type Ctrl-D to close the REPL's input stream.

Embedding

To embed the module within your own configuration language, add it to your globals:

globals := starlark.StringDict{
    "http": nethttp.NewModule(),
}

Contributing

Contributions welcome.

You can’t perform that action at this time.