Skip to content

XMLHttpRequest is not defined in Netlify Functions #370

@pankajpatel

Description

@pankajpatel

Issue Summary

XMLHttpRequest is not defined in Netlify Functions

To Reproduce

  1. Try to fetch content via Content API JS SDK in netlify function

I think @tryghost/content-api uses axios to send AJAX requests. Axios depends heavily on XMLHttpRequest for its functioning.

Possible alternatives can be https://github.com/developit/redaxios

Technical details:

  • Ghost Version: 3.41.4
  • Node Version: 12.20.1
  • Browser/OS: Irrelevant
  • Database: mysql

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions