Patch Request domain service failed
I am trying to do a patch Request to update a domain but fails with status 405 and the message Method "PATCH" not allowed.
the request is like this :
Request failed: {
url: '/books/domain-service/domains/undefined',
method: 'patch',
data: `{"id":10058,"properties":{"entire_journal_open_access":true},"attributes":[{"restrictions":[{"id":1,"value":"none"},{"id":2,"value":"disc"},{"id":3,"value":"circle"},{"id":4,"value":"square"},{"id":5,"value":"decimal"},{"id":6,"value":"lower-roman"},{"id":7,"value":"upper-roman"},{"id":8,"value":"lower-alpha"},{"id":9,"value":"upper-alpha"},{"id":10,"value":"use-source-label"}, ..... `
headers: {
Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/json',
Authorization: 'Basic Y29rbzpjb2tvYWxsb3dlZA==',
'User-Agent': 'axios/0.19.2',
'Content-Length': 27454
},
baseURL: 'https://preview.ncbi.nlm.nih.gov',
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus]
}
Status: 405
Data: {
meta: { status: 'error' },
body: { detail: 'Method "PATCH" not allowed.' }
}