Skip to content

Custom user agent fails when running as a web application #24

Description

@ryanmcfall

The code in geocode_client.dart sets a custom User-Agent value of geocode (dart:io). I believe this was done to avoid [issues with requests being blocked by geocode.xyz])(#20).

When I build and run a web application using this package, an error occurs since Chrome won't send a custom User-Agent as part of an XMLHttpRequest call. Therefore, inside a web app, I believe calls to perform geocoding always fail.

Am I correct that the User-Agent header is needed to make the request be accepted by geocode.xyz? And if so, is there a work around to allow a web application to work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions