Git Product home page Git Product logo

Comments (5)

 avatar commented on September 7, 2024

This issue as been imported as question since it does not respect http issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/http/issues/c20.

from http.

lcherone avatar lcherone commented on September 7, 2024

bot closed it, ill leave it with you..

from http.

lcherone avatar lcherone commented on September 7, 2024

additionally, the response object looks like:

Response 
  body: ReadableStream
    locked: false
    __proto__: ReadableStream
  bodyUsed: false
  headers: Headers
    __proto__: Headers
  ok: true
  redirected: false
  status: 200
  statusText: "OK"
  type: "cors"
  url: "http://icanhazip.com/"
  __proto__: Response

network all good and shows content (ip).. also the same error if done outside of asyncData as a normal method and called in mounted.. maybe I'm missing something obvious

from http.

jukbot avatar jukbot commented on September 7, 2024

Just FYI for other who got this issue.
It seems that the document is missing response promise chain, so it should be

const requestData = await $http.get('http://icanhazip.com')
const ip = await requestData.text()
return { ip }

from http.

lcherone avatar lcherone commented on September 7, 2024

@jukbot yup.. but rtm: https://http.nuxtjs.org/guide/usage.html#using-in-asyncdata

from http.

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.