Skip to content

Refused to set unsafe header "User-Agent" #64

@mtrabelsi

Description

@mtrabelsi

sample code

const api = new WooCommerceRestApi({
  url: "http://my-personal-store.com",
  consumerKey: "ck_xxxxxxxxxx",
  consumerSecret: "cs_xxxxxxxx",
  version: "wc/v3"
});

const { data : categories } = await api.get(`products/categories`)

fires successfully and return the response but it also spit errors in Chrome console

Refused to set unsafe header "User-Agent"

It is also taking a lot of time to fetch (2-3s) due to throwing and catching (i guess)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions