web

package module
v0.0.0-...-75be50b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2015 License: MIT Imports: 5 Imported by: 1

README

web

Convenience methods in Go for web, such as websockets and API calls

Notes

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(url, username, password string) ([]byte, error)

func Get

func Get(url, username, password string) ([]byte, error)

func ListenToSocket

func ListenToSocket(url, subscribeBody, unsubscribeBody string, c chan []byte, quit chan bool)

Listens to text responses over a websocket and passes them to a channel.

Arguments:

  • url e.g. wss://live.stellar.org:9001
  • body e.g. `{ "command": "subscribe", "streams": [ "transactions" ] }`

func Patch

func Patch(url, username, password string, data []byte) ([]byte, error)

func Post

func Post(url, username, password string, data []byte) ([]byte, error)

data := []byte(`{"method":"create_keys"}`)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL