Code Monkey home page Code Monkey logo

Comments (17)

gkatsanos avatar gkatsanos commented on August 17, 2024 12

can't figure out how to do JSONP request.. please add an example..

from vue-resource.

 avatar commented on August 17, 2024 7

I believe the correct way of doing this going forward is actually this...

Vue.http.options.credentials = true;

from vue-resource.

ak4nv avatar ak4nv commented on August 17, 2024 3

Hm...
I've got the error Request header field Content-Type is not allowed by Access-Control-Allow-Headers
According to this post, may be default setting application/json for Content-Type field header for cors requests is not good idea?

from vue-resource.

intositeme avatar intositeme commented on August 17, 2024

Yes. the documentation is lacking.

from vue-resource.

ernysans avatar ernysans commented on August 17, 2024

+1 This is one of the most important reasons why I haven't be able to fully migrate to vue. I'm trying to develop an api but I can't properly access the data, the get method is not good because makes a new session every time and I need to retrieve specific data from the logged user. I'm stuck. There is some old examples going around but doesn't work with the latest version. Please help.

from vue-resource.

likeadeckofcards avatar likeadeckofcards commented on August 17, 2024

Agreed more documentation would be nice.

from vue-resource.

uwe avatar uwe commented on August 17, 2024

I got it working by this:

Vue.http.options.xhr = {withCredentials: true};

from vue-resource.

YerkoPalma avatar YerkoPalma commented on August 17, 2024

I opened an issue about the lack of documentation (#244). What would you like to include in the docs?

from vue-resource.

Rachelin avatar Rachelin commented on August 17, 2024

@ak04nv Yes!!
I also met this problem too.

from vue-resource.

stephanedemotte avatar stephanedemotte commented on August 17, 2024

+1

from vue-resource.

 avatar commented on August 17, 2024

CORS cookies dont sended with that options.

from vue-resource.

Shidou avatar Shidou commented on August 17, 2024

Vue.http.options.xhr = {withCredentials: true};
Vue.http.options.emulateJSON = true;

on vuejs2.0 to solve ‘post’ request。

from vue-resource.

raphcadiz avatar raphcadiz commented on August 17, 2024

@townfolio sorry I'm so noob on vue, where exactly do set that?. I have this main js from the web-pack

from vue-resource.

gkatsanos avatar gkatsanos commented on August 17, 2024

@raphcadiz you should not use vue-resource but rather switch to an external Promises library or use native window.fetch. https://medium.com/the-vue-point/retiring-vue-resource-871a82880af4#.4nk3rlhn9

from vue-resource.

qianthinkover avatar qianthinkover commented on August 17, 2024

Did anybody to solve this problem?

from vue-resource.

likeadeckofcards avatar likeadeckofcards commented on August 17, 2024

@qianthinkover I am not sure if anyone did. Lately, I think many people have been moving towards using axios instead of vue-resource since they are retiring vue-resource: https://medium.com/the-vue-point/retiring-vue-resource-871a82880af4

from vue-resource.

ak4nv avatar ak4nv commented on August 17, 2024

@qianthinkover did you read my comment above?

from vue-resource.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.