How to pass params using fetch API in vuejs vuex store action
I am trying to pass a dict using fetch API to django views but unable to get it in request dict of views. I have tried below steps:
fetch(`/api/getnames`, [{'a': name, 'b': name}])
.then()
.catch((err) => {
console.log('Fetch Error :-S', err);
})
def getnames(request):
print(request.__dict__)
I am trying to get the dict passed in par开发者_如何学运维ams while calling the url but dict is not present. Kindly suggest a solution to resolve this issue.
精彩评论