File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -222,6 +222,11 @@ func runTask(ctx context.Context, event any) (evt *TaskCompleteEvent) {
222222 return errorToTaskComplete (ErrBadRequest )
223223 }
224224
225+ method := it .Header .Get ("x-polycode-task-api-method" )
226+ if method == "" {
227+ return errorToTaskComplete (ErrBadRequest )
228+ }
229+
225230 workflowCtx := WorkflowContext {
226231 ctx : ctx ,
227232 sessionId : sessionId ,
@@ -231,6 +236,7 @@ func runTask(ctx context.Context, event any) (evt *TaskCompleteEvent) {
231236 wkfCtx := context .WithValue (it .Context (), "polycode.context" , workflowCtx )
232237 it = it .WithContext (wkfCtx )
233238 it .URL .Path = path
239+ it .Method = method
234240
235241 println (fmt .Sprintf ("client: invoke handler %s with session id %s" , path , sessionId ))
236242 resp := invokeHandler (httpHandler , it )
You can’t perform that action at this time.
0 commit comments