PDA

View Full Version : [CLOSED] Converting from v1.4 - v2.0, what is the update for the 'Method' in HttProxy when converted to AjaxProxy??



Fahd
Jun 22, 2012, 9:01 PM
Do I still need to set the 'Method' property in the NEW AjaxProxy ??

Old: v1.4


Store.Proxy.Add(new HttpProxy
{
DisableCaching = true,
Json = true,
Method = HttpMethod.GET,
Url = Core.Web.ProcessController.HandlerUrl()
});


NEW: v2.0


Store.Proxy.Add(new AjaxProxy
{
NoCache = true,
Json = true,
//GetMethod = HttpMethod.GET,
Url = Core.Web.ProcessController.HandlerUrl()
});

Daniil
Jun 25, 2012, 12:13 PM
Hi,

Please see the CHANGELOG item #15.
http://examples2.ext.net/#/Getting_Started/Release_Documents/CHANGELOG/

Here how it looks.


15. The server HttpProxy class has been renamed to AjaxProxy.

Example
//Old
<ext:HttpProxy Url="Some.url" />

//New
<ext:AjaxProxy Url="Some.url" />

And there is no .Method

Use ActionMethods

Example

//Old
<ext:HttpProxy Url="some.url" Method="POST">

//New
<ext:AjaxProxy Url="some.url">
<ActionMethods READ="POST" />
</ext:AjaxProxy>


And yes, I think you should set up

<ActionMethods READ="GET" />

Fahd
Jun 25, 2012, 2:08 PM
How would I set this up in the Code Behind ??


Hi,

Please see the CHANGELOG item #15.
http://examples2.ext.net/#/Getting_Started/Release_Documents/CHANGELOG/

Here how it looks.


And yes, I think you should set up

<ActionMethods READ="GET" />

Daniil
Jun 25, 2012, 2:14 PM
Example

AjaxProxy proxy = new AjaxProxy();
proxy.ActionMethods.Read = HttpMethod.GET;

Fahd
Jun 25, 2012, 2:40 PM
Ok, thank you.

I was trying to do it like below, but some how it does seems to like 'ActionMethod.Read'



Store.Proxy.Add(new AjaxProxy
{
NoCache = true,
Json = true,
ActionMethods.Read = HttpMethod.GET,
Url = Core.Web.ProcessController.HandlerUrl()
});





Example

AjaxProxy proxy = new AjaxProxy();
proxy.ActionMethods.Read = HttpMethod.GET;

Daniil
Jun 25, 2012, 3:26 PM
Within a constructor it should look like this.

Example

AjaxProxy proxy = new AjaxProxy()
{
ActionMethods =
{
Read = HttpMethod.GET
}
};

Fahd
Jun 25, 2012, 3:50 PM
Thank you...


Within a constructor it should look like this.

Example

AjaxProxy proxy = new AjaxProxy()
{
ActionMethods =
{
Read = HttpMethod.GET
}
};