oh, you can set the "emulation" option to false.
JSONP can't do any of that, because it's basically injects <script>
elements.


On Sat, Apr 13, 2013 at 8:50 PM, hartum <[email protected]> wrote:

> that's what I thought but the request is coming.
> So far the only difference is that the request in jQuery is sent like
> "PU"T but in mootools is sent like "EMULATION".
> The info is taken from browser console network.
>
> anyway, is it possible to send a request JSONP with PUT method?
>
> El viernes, 12 de abril de 2013 14:57:09 UTC+2, Arian Stolwijk escribió:
>>
>> Probably because you're doing a cross-domain request.
>>
>>
>> On Fri, Apr 12, 2013 at 2:37 PM, hartum <[email protected]> wrote:
>>
>>> Hi everyone
>>>
>>> I am translating a script from jQuery to mootools, the script in jQuery
>>> is this:
>>>
>>> $.ajax({
>>>             
>>> url:'http://10.1.1.94:8080/ui-**web-logger/rest/events/load<http://10.1.1.94:8080/ui-web-logger/rest/events/load>
>>> ',
>>>             type: "PUT",
>>>             data: $.toJSON(jSonObject),
>>>             contentType: "application/json",
>>>             crosssDomain: true
>>>         });
>>>
>>>
>>>
>>> And It is working fine, but when I tried to translate into mootools in
>>> this way:
>>>
>>> var myRequest = new Request({
>>>             
>>> url:'http://10.1.1.94:8080/ui-**web-logger/rest/events/load<http://10.1.1.94:8080/ui-web-logger/rest/events/load>
>>> ',
>>>             emulation: false,
>>>             method: 'PUT',
>>>             data: JSON.encode(jSonObject),
>>>             headers: {'Content-Type': 'application/json'},
>>>         }).put();
>>>
>>>
>>> It does not work, what I miss in translation? I tried with jSONP too but
>>> it does not accept PUT method.
>>>
>>> Could you help me please? Thank you very much.
>>>
>>> *I could write it into jsFiddle if you prefer
>>>
>>>
>>>
>>>  --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "MooTools Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to mootools-user...@**googlegroups.com.
>>>
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>>
>>>
>>
>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "MooTools Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to