Skip to content

Instantly share code, notes, and snippets.

@CandleCandle
CandleCandle / README.md
Last active May 30, 2017 09:40
HTTPClient performing multiple requests

Problem

Examples and docs say:

  • Create a HTTPClient "A client should create one instance of this class."[0]
  • Create a Payload
  • Create a HandlerMaker
  • Call client.apply(payload, handlermaker)
@CandleCandle
CandleCandle / main.pony
Last active May 3, 2016 15:38
iso vs iso!
use "collections"
use "net"
actor Main
new create(env: Env) =>
let item = Settings.create("localhost", 5554)
let s = ServerRef.create(item)
s.connect(env, Listener.create(s))
private static enum DBColumnTypes {
BOOL(1) {
@Override public void process(Args arguments) {
// do stuff here that you would otherwise do in the switch block
}
},
;