Gets the successful response from an action (200 or 201)

@param action
The action to parse
@return The Successful response or null if not found
320100
public static RamlResponse getSuccessfulResponse(RamlAction action) {
		String[] successfulResponses = new String[] { "200", "201", "202" };
		for (String code : successfulResponses) {
			if (action != null && !CollectionUtils.isEmpty(action.getResponses()) && action.getResponses().containsKey(code)) {
				return action.getResponses().get(code);
			}
		}
		return null;
	}
559475
public function get($uri, $action)
    {
        $uri = $this->buildUri($uri);

        return $this->addResponseType(Route::get($uri, $action));
    }
928438
def get_action(self, action=None):
        
        if action:
            self.action = action

        if self.action not in AjaxResponseAction.choices:
            raise ValueError(
                "Invalid action selected: '{}'".format(self.action))

        return self.action
306687
private function describeActions($action = "") {

		if (!empty($action)) {
			$parts = explode('_', $action);
			unset($parts[0]);
			$parts = array_values($parts);

			$act = new \stdClass();

			$act->method = $action;

			switch (count($parts)) {
			case 1:
			case 2:
			case 3:
				$act->name = $parts[0];
			case 2:
			case 3:
				$act->tag = $parts[1];
			case 3:
				$act->priority = intval($parts[2]);
				break;
			}
			if (count($parts) == 1) {
				$act->tag = 'initi';
				$act->priority = 10;
			}

			return $act;

		}
		return null;
	}
529902
public function next(string $action = null): string
    {
        $this->message = $this->handle($action);

        if ($this->message instanceof Dispatcher)
        {
            return $this->message->next();
        }

        $response = $this->message;

        if (!($response instanceof MessageInterface))
        {
            $stream   = $this->factory->stream->createStream($response);
            $response = $this->message()->withBody($stream);
        }

        $this->setMessage($response);

        return (string)$this;
    }
1363790
private void handleActionException(String target, HttpServletRequest request, HttpServletResponse response, Action action, ActionException e) {
		int errorCode = e.getErrorCode();
		String msg = null;
		if (errorCode == 404) {
			msg = "404 Not Found: ";
		} else if (errorCode == 400) {
			msg = "400 Bad Request: ";
		} else if (errorCode == 401) {
			msg = "401 Unauthorized: ";
		} else if (errorCode == 403) {
			msg = "403 Forbidden: ";
		}
		
		if (msg != null) {
			if (log.isWarnEnabled()) {
				String qs = request.getQueryString();
				msg = msg + (qs == null ? target : target + "?" + qs);
				if (e.getMessage() != null) {
					msg = msg + "\n" + e.getMessage();
				}
				log.warn(msg);
			}
		} else {
			if (log.isErrorEnabled()) {
				String qs = request.getQueryString();
				log.error(errorCode + " Error: " + (qs == null ? target : target + "?" + qs), e);
			}
		}
		
		e.getErrorRender().setContext(request, response, action.getViewPath()).render();
	}
820907
private static IAction createAction(String action) {
        IAction actn = null;
        
        if (!StringUtils.isEmpty(action)) {
            if ((actn = ActionRegistry.getRegisteredAction(action)) == null) {
                actn = ActionUtil.createAction(null, action);
            }
        }
        
        return actn;
    }
137182
@Override
    public String action(EntityActionOperation entityActionOperation)
            throws ServiceException {
        ClientResponse clientResponse = getActionClientResponse(entityActionOperation);
        entityActionOperation.processResponse(clientResponse);
        
        //PipelineHelpers.throwIfNotSuccess(clientResponse);
        
        if (clientResponse.getHeaders().containsKey("operation-id")) {
            List<String> operationIds = clientResponse.getHeaders().get("operation-id");
            if (operationIds.size() >= 0) {
                return operationIds.get(0);
            }
        }
        return null;
    }
164543
public static String getToken(HttpServletRequest request, String action)
    {
        FlowController flowController = PageFlowUtils.getCurrentPageFlow(request);

        if (flowController != null) {
            MappingAndController mac = getActionMapping(request, flowController, action);
            if (mac != null) return getToken(request, mac.mapping);
        }

        return null;
    }
736766
public static <A> FutureCallback<A> onFailureDo(final Action<Throwable> action) {
        return futureCallback(Actions.<A>nothing(), action);
    }
1356157
private function getOperation(Action $action, EnvironmentInterface $environment)
    {
        /** @var Contao2BackendViewDefinitionInterface $definition */
        $definition = $environment->getDataDefinition()->getDefinition(Contao2BackendViewDefinitionInterface::NAME);
        $name       = $action->getName();
        $commands   = $definition->getModelCommands();

        if (!$commands->hasCommandNamed($name)) {
            return null;
        }

        return $commands->getCommandNamed($name);
    }
580664
public alluxio.grpc.SetAclAction getAction() {
    alluxio.grpc.SetAclAction result = alluxio.grpc.SetAclAction.valueOf(action_);
    return result == null ? alluxio.grpc.SetAclAction.REPLACE : result;
  }
866691
public Wait action(TestAction action) {
        if (action instanceof TestActionBuilder) {
            getCondition().setAction(((TestActionBuilder) action).build());
            this.action.setAction(((TestActionBuilder) action).build());
            getBuilder().actions(((TestActionBuilder) action).build());
        } else {
            getCondition().setAction(action);
            this.action.setAction(action);
            getBuilder().actions(action);
        }

        return getBuilder().build();
    }
490701
public static <T1, T2> Func2<T1, T2, Void> toFunc(final Action2<T1, T2> action) {
        return toFunc(action, (Void) null);
    }
1327314
public static ProcessorActionHandler getHandler(ProcessorAction action) {
        ProcessorActionHandler ret = null;
        Class<? extends ProcessorActionHandler> cls = handlers.get(action.getClass());
        if (cls != null) {
            try {
                Constructor<? extends ProcessorActionHandler> con = cls.getConstructor(ProcessorAction.class);
                ret = con.newInstance(action);
            } catch (Exception e) {
                log.log(Level.SEVERE, "Failed to instantiate handler for action '" + action + "'", e);
            }
        }
        return ret;
    }
582318
public ActionResult getActionResult(String actionId) {
        if (actionId == null) {
            return null;
        }
        for (ListIterator<ContentResult> iterator = listIterator(size()); iterator.hasPrevious();) {
            ContentResult contentResult = iterator.previous();
            ActionResult actionResult = contentResult.getActionResult(actionId);
            if (actionResult != null) {
                return actionResult;
            }
        }
        return null;
    }
377055
function obtainInfo(id, action, cb) {
    request.get({
        url: action,
        timeout: 20000,
        strictSSL: false
    }, function (error, response, body) {
        if (error || response.statusCode != 200) {
            cb(utils.errorDown())
            return
        }

        // Not found
        if (body.indexOf('errorMessage') != -1) {
            cb(utils.errorNoData())
            return
        }

        let entity = null
        try {
            entity = createParcelTrackerEntity(body)
        } catch (error) {
            return cb(utils.errorParser(id, error.message))
        }

        if(entity != null) cb(null, entity)
    })
}