Base64 encode the code in json objects.

This will make the API easier for clients.  Also add a ?raw=1 flag to
the function GET API, to get just the code of the function.
This commit is contained in:
Soam Vasani
2016-09-22 01:07:34 -07:00
parent d836be88da
commit 79fb54820e
3 changed files with 58 additions and 5 deletions
+4
View File
@@ -56,6 +56,10 @@ func TestFunctionApi(t *testing.T) {
uid1 := m.Uid
log.Printf("Created function %v: %v", m.Name, m.Uid)
code, err := g.client.FunctionGetRaw(m)
panicIf(err)
assert(string(code) == testFunc.Code, "code from FunctionGetRaw must match created function")
testFunc.Code = "code2"
m, err = g.client.FunctionUpdate(testFunc)
panicIf(err)