Git Product home page Git Product logo

Comments (9)

dekadentno avatar dekadentno commented on September 7, 2024 1

I can try to resolve this and submit a pull request, but I am not sure why the port would be mandatory in the first place, maybe there's a reason but I don't see it.

from http.

pi0 avatar pi0 commented on September 7, 2024 1

@dekadentno Actually nothing to sorry and thanks for report. I saw baseUrl misspelling multiple times. It is not module bug but a DX bug that we should handle properly. Will push fix for both :)

from http.

ricardogobbosouza avatar ricardogobbosouza commented on September 7, 2024

Hi @dekadentno
Just use the baseURL option

http: {
  baseURL: 'https://bla.bla.com/v1'
}

from http.

dekadentno avatar dekadentno commented on September 7, 2024

Hi @dekadentno
Just use the baseURL option

http: {
  baseURL: 'https://bla.bla.com/v1'
}

Hi @ricardogobbosouza
I've tried that. Also not possible because it automatically adds the default port (3000) at the end of the baseURL. Check line 20 here:
https://github.com/nuxt/http/blob/dev/lib/module.js

from http.

ricardogobbosouza avatar ricardogobbosouza commented on September 7, 2024

The options are overwritten, see
https://github.com/nuxt/http/blob/dev/lib/module.js#L38

from http.

dekadentno avatar dekadentno commented on September 7, 2024

The options are overwritten, see
https://github.com/nuxt/http/blob/dev/lib/module.js#L38

I understand what you are trying to say, but I still get the default port at the end of my baseURL on every request. My nuxt.config.js looks just like the one you wrote in your comment.

Edit: I'll make a repo with my problem this weekend.

from http.

ricardogobbosouza avatar ricardogobbosouza commented on September 7, 2024

@dekadentno
I await the Repo

from http.

pi0 avatar pi0 commented on September 7, 2024

I agree with @ricardogobbosouza to use baseURL to override. But could be also nice enhancenment to omit the port if is matching scheme (https/443 http/80)

from http.

dekadentno avatar dekadentno commented on September 7, 2024

Thank you for your answers and your time @ricardogobbosouza @pi0
I am very ashamed but I have to let you know that the source of my problems was in my baseUrl because the currect spelling is baseURL 😅 I noticed that right now while trying to reproduce my problem in a separate repo so I can upload it for you guys.

I hope my mistake will help some future lurkers because I spent more than a week on this issue in vain.

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.