diff --git a/api/agent/protocol/json.go b/api/agent/protocol/json.go index 49597e02e..c6cbf737e 100644 --- a/api/agent/protocol/json.go +++ b/api/agent/protocol/json.go @@ -30,7 +30,6 @@ type CallResponseHTTP struct { // jsonIn We're not using this since we're writing JSON directly right now, but trying to keep it current anyways, much easier to read/follow type jsonIn struct { CallID string `json:"call_id"` - Type string `json:"type"` Deadline string `json:"deadline"` Body string `json:"body"` ContentType string `json:"content_type"` @@ -71,7 +70,6 @@ func (h *JSONProtocol) writeJSONToContainer(ci CallInfo) error { Body: body, ContentType: ci.ContentType(), CallID: ci.CallID(), - Type: ci.CallType(), Deadline: ci.Deadline().String(), Protocol: CallRequestHTTP{ Type: ci.ProtocolType(), diff --git a/api/agent/protocol/json_test.go b/api/agent/protocol/json_test.go index 344c904ea..d1a3d10a1 100644 --- a/api/agent/protocol/json_test.go +++ b/api/agent/protocol/json_test.go @@ -80,10 +80,6 @@ func TestJSONProtocolwriteJSONInputRequestBasicFields(t *testing.T) { t.Errorf("Request ContentType assertion mismatch: expected: %s, got %s", ci.ContentType(), incomingReq.ContentType) } - if incomingReq.Type != ci.CallType() { - t.Errorf("Request CallType assertion mismatch: expected: %s, got %s", - ci.CallType(), incomingReq.Type) - } if incomingReq.Deadline != ci.Deadline().String() { t.Errorf("Request Deadline assertion mismatch: expected: %s, got %s", ci.Deadline(), incomingReq.Deadline) diff --git a/docs/developers/function-format.md b/docs/developers/function-format.md index 62dcc39f3..bb1ef6592 100644 --- a/docs/developers/function-format.md +++ b/docs/developers/function-format.md @@ -84,7 +84,6 @@ Internally functions receive data in the example format below: { "call_id": "123", "content_type": "application/json", - "type":"sync", "deadline":"2018-01-30T16:52:39.786Z", "body": "{\"some\":\"input\"}", "protocol": { @@ -103,9 +102,9 @@ BLANK LINE } ``` +* body - the main contents. If HTTP is the protocol, this would be the request body. * call_id - the unique ID for the call. * content_type - format of the `body` parameter. -* type - whether the call was sync or async. * deadline - a time limit for the call, based on function timeout. * protocol - arbitrary map of protocol specific data. The above example shows what the HTTP protocol handler passes in. Subject to change and reduces reusability of your functions. **USE AT YOUR OWN RISK**.