开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜