Skip to content

URL is not encoded as UTF-8 #245

@kumar303

Description

@kumar303

I think node-fetch is not encoding non-ascii URLs (which are JavaScript strings) as UTF-8, such as: https://some-server.net/api/thing/diccionario-español/. Making a GET request with fetch() in Firefox/Chrome works as expected but making a GET request on a NodeJS (6.9.4) server with node-fetch does not encode the URL properly. I haven't investigated what the exact discrepancy between the two is but when I added utf8.encode(url) to my NodeJS code, it worked.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions