Why do you need a proxy here? I believe you could do exactly the same without proxy: function processData(inputData) would return a promise that does sendMessage and resolves with a response from backend.
Hell @mqklin , you say:
"return a promise that does sendMessage and resolves with a response from backend"
That's exactly what this code is doing, but instead of explicitly writing the piece of code that will do that in processData or any methods that need to be used that way, it do that for you, on your behalf so you don't have to care about it.
Does it answer your question?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Why do you need a proxy here? I believe you could do exactly the same without proxy:
function processData(inputData)
would return a promise that doessendMessage
and resolves with a response from backend.Hell @mqklin , you say:
"return a promise that does sendMessage and resolves with a response from backend"
That's exactly what this code is doing, but instead of explicitly writing the piece of code that will do that in
processData
or any methods that need to be used that way, it do that for you, on your behalf so you don't have to care about it.Does it answer your question?