Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 405 on Strapi request #4

Open
dulcetti opened this issue May 17, 2021 · 2 comments
Open

Error 405 on Strapi request #4

dulcetti opened this issue May 17, 2021 · 2 comments

Comments

@dulcetti
Copy link

I've tried, but it's returning an error =/:

UnhandledPromiseRejectionWarning: Error: Request failed with status code 405

The response:

response: {
  status: 405,
  statusText: 'Method Not Allowed',
  headers: {
    vary: 'Origin',
    'strict-transport-security': 'max-age=31536000; includeSubDomains',
    'x-frame-options': 'SAMEORIGIN',
    allow: 'HEAD, GET',
    'x-powered-by': 'Strapi <strapi.io>',
    'x-response-time': '17ms',
    'content-type': 'text/plain; charset=utf-8',
    'content-length': '18',
    date: 'Mon, 17 May 2021 20:10:04 GMT',
    connection: 'close'
  },
  config: {
    url: 'http://localhost:1337/admin/auth/local',
    method: 'post',
    data: '{"identifier":"MYEMAIL","password":"MYPASSWORD"}',
    headers: [Object],
    transformRequest: [Array],
    transformResponse: [Array],
    timeout: 0,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    validateStatus: [Function: validateStatus]
  },
}
@samrit
Copy link

samrit commented Jul 11, 2021

Strapi's endpoints have changes since. You will need to change strapiUrl + "/admin/auth/local" to strapiUrl + "/auth/local"

@kumard3
Copy link

kumard3 commented Oct 9, 2021

I am getting this error while exporting to JSON file.

Parsing wordpress export file
/home/kumar/code/github/wordpress-2-strapi/wp-export-to-json.js:119
const authors = (_get(otherProps, "wp:author") || []).map((a) => {
^

TypeError: (_get(...) || []).map is not a function
at Object. (/home/kumar/code/github/wordpress-2-strapi/wp-export-to-json.js:119:55)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants