Git Product home page Git Product logo

Comments (5)

Jaswanth75 avatar Jaswanth75 commented on May 19, 2024

Hi @dpinart ,

Past one week I have been dealing with request and response objects in fetch client.
May be I can be of any help.

Can you please specify, what input type you are passing and what output type you are expecting from the fetch client to handle ?

from fetch-client.

dpinart avatar dpinart commented on May 19, 2024

Hi @Jaswanth75
Thanks for your interest
I'm just performing a get verb. The response is a json stringfied coming from the backend (SAP ERP). The backend is configured to use charset ISO-8859-1 but json works with UTF-8 and several characters like diacritics, euro symbol and other are not being printed well in the screen

from fetch-client.

Jaswanth75 avatar Jaswanth75 commented on May 19, 2024

Hi @dpinart ,

Can you try this piece of code...

$.ajax({
    url: '...',
    contentType: 'Content-type: text/plain; charset=iso-8859-1',
    // This is the imporant part!!!
    beforeSend: function(jqXHR) {
        jqXHR.overrideMimeType('text/html;charset=iso-8859-1');
    }
})

from fetch-client.

dpinart avatar dpinart commented on May 19, 2024

Hi @Jaswanth75
I could handle with iso-8859-1 encoding with jquery.ajax method by just setting dataType option to 'json". I'm getting rid of jquery and would like to get a similar option with fetch-client

from fetch-client.

EisenbergEffect avatar EisenbergEffect commented on May 19, 2024

This isn't an issue with our library, per se. It's an issue of configuring fetch correctly. I believe that the above example shows that a content type specification is in order so I would suggest trying that with our fetch client by adding the header.

from fetch-client.

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.