Actually, it is not possible but you can create a rest component instead. For more details about rest, please refer to the following article WS.