Page 1 of 1

ExtensionRequest cannot take null params

Posted: 15 Aug 2014, 16:34
by Evil-Dog
Hi there, I've got this line of code to send a request to the server:
GetSFS().Send(new ExtensionRequest("SetEveryoneEnteredRoom", new SFSObject(), m_Room));

I was passing null since there are no arguments to send, like this;
GetSFS().Send(new ExtensionRequest("SetEveryoneEnteredRoom", null, m_Room));
but it didn't work unless I pass an actual SFSObject that won't be used.

Is that normal?
Cause this is with unity client, the flash client can pass null and it works but not the unity client, the server never gets the request.
Thoughts?

Re: ExtensionRequest cannot take null params

Posted: 16 Aug 2014, 12:04
by Lapo
If you don't have any parameters in the request you can pass an empty SFSObject, which is what happens behind the hood when you pass a null in Actionscript/Flash.

Anyways, thanks for reporting, we'll add an extra constructor that doesn't require the SFSObject, for those requests.

cheers

Re: ExtensionRequest cannot take null params

Posted: 15 Sep 2014, 16:57
by Evil-Dog
Cool thanks, it's gonna be more consistent that way.