POST request

17 views
Skip to first unread message

Mohamed Bennekrouf

unread,
Oct 16, 2014, 8:47:52 AM10/16/14
to angula...@googlegroups.com
I looks like angular-cache is not caching POST request ? Am I wrong


I have this :

$http({
                    cache: true,
                    method: 'POST',
                    data: query,
                    params: params,
                    url: ....
                })

and nothing is cached. 

Jason Dobry

unread,
Oct 16, 2014, 10:18:32 AM10/16/14
to Mohamed Bennekrouf, angula...@googlegroups.com
I believe $http only uses the cache for GET and JSONP requests. For POST/PUT/PATCH, you need to put the response into the cache yourself.

--
You received this message because you are subscribed to the Google Groups "angular-cache" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular-cach...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jason Dobry
jason...@gmail.com

NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.

Bennekrouf.com

unread,
Oct 16, 2014, 11:20:13 AM10/16/14
to Jason Dobry, angula...@googlegroups.com
Alright
We should add this information in the documentation 

Jason Dobry

unread,
Oct 16, 2014, 11:24:06 AM10/16/14
to Bennekrouf.com, angula...@googlegroups.com

It's unfortunate that this isn't mentioned in the documentation for $http, as that's where it should be documented.
Reply all
Reply to author
Forward
0 new messages