Code Monkey home page Code Monkey logo

Comments (3)

tulios avatar tulios commented on May 18, 2024

Hi @ericholiveira, thanks for the report. Can you try to set your header to content-type, all in lowercase?

Maybe this (https://github.com/tulios/mappersmith/blob/master/src/gateway/vanilla-gateway.js#L124) is failing, this is definitely a bug, I'll take a look.

Thanks again.

from mappersmith.

ericholiveira avatar ericholiveira commented on May 18, 2024

Ive tried with 'content-type' but still doenst work... actually i think the line of code you highlighted works... the problem is in _setContentTypeHeader you call request.setRequestHeader('Content-Type', contentType); which sets the correct content type... but on the next function call _setUserDefinedHeaders you are just setting all headers again (including content-type) and for this reason it duplicate this header. A simple filter on _setUserDefinedHeaders to avoid setting content-type again should do the trick.

from mappersmith.

tulios avatar tulios commented on May 18, 2024

@ericholiveira This is a quick fix but it should work well. I'm planning a major refactor on mappersmith internals. Thanks again!

from mappersmith.

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.