Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PS D:\Arbeitszimmer\Projekte\DiscordBot\Mind-Imager\main> npm start
- > [email protected] start
- > node index.js
- Logged in as Arty#7655!
- Arty is connected to http://127.0.0.1:9090/images/generate
- Error: Request failed with status code 405
- at createError (D:\Arbeitszimmer\Projekte\DiscordBot\Mind-Imager\main\node_modules\axios\lib\core\createError.js:16:15)
- at settle (D:\Arbeitszimmer\Projekte\DiscordBot\Mind-Imager\main\node_modules\axios\lib\core\settle.js:17:12)
- at IncomingMessage.handleStreamEnd (D:\Arbeitszimmer\Projekte\DiscordBot\Mind-Imager\main\node_modules\axios\lib\adapters\http.js:293:11)
- at IncomingMessage.emit (node:events:525:35)
- at endReadableNT (node:internal/streams/readable:1359:12)
- at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
- config: {
- transitional: {
- silentJSONParsing: true,
- forcedJSONParsing: true,
- clarifyTimeoutError: false
- },
- adapter: [Function: httpAdapter],
- transformRequest: [ [Function: transformRequest] ],
- transformResponse: [ [Function: transformResponse] ],
- timeout: 0,
- xsrfCookieName: 'XSRF-TOKEN',
- xsrfHeaderName: 'X-XSRF-TOKEN',
- maxContentLength: -1,
- maxBodyLength: -1,
- validateStatus: [Function: validateStatus],
- headers: {
- Accept: 'application/json, text/plain, */*',
- 'Content-Type': 'application/json',
- 'User-Agent': 'axios/0.24.0',
- 'Content-Length': 33
- },
- method: 'post',
- url: 'http://127.0.0.1:9090/images/generate',
- data: '{"text":"a house","format":"png"}'
- },
- request: <ref *1> ClientRequest {
- _events: [Object: null prototype] {
- abort: [Function (anonymous)],
- aborted: [Function (anonymous)],
- connect: [Function (anonymous)],
- error: [Function (anonymous)],
- socket: [Function (anonymous)],
- timeout: [Function (anonymous)],
- finish: [Function: requestOnFinish]
- },
- _eventsCount: 7,
- _maxListeners: undefined,
- outputData: [],
- outputSize: 0,
- writable: true,
- destroyed: false,
- _last: true,
- chunkedEncoding: false,
- shouldKeepAlive: false,
- maxRequestsOnConnectionReached: false,
- _defaultKeepAlive: true,
- useChunkedEncodingByDefault: true,
- sendDate: false,
- _removedConnection: false,
- _removedContLen: false,
- _removedTE: false,
- strictContentLength: false,
- _contentLength: 33,
- _hasBody: true,
- _trailer: '',
- finished: true,
- _headerSent: true,
- _closed: false,
- socket: Socket {
- connecting: false,
- _hadError: false,
- _parent: null,
- _host: null,
- _closeAfterHandlingError: false,
- _readableState: [ReadableState],
- _events: [Object: null prototype],
- _eventsCount: 7,
- _maxListeners: undefined,
- _writableState: [WritableState],
- allowHalfOpen: false,
- _sockname: null,
- _pendingData: null,
- _pendingEncoding: '',
- server: null,
- _server: null,
- parser: null,
- _httpMessage: [Circular *1],
- [Symbol(async_id_symbol)]: 90,
- [Symbol(kHandle)]: [TCP],
- [Symbol(lastWriteQueueSize)]: 0,
- [Symbol(timeout)]: null,
- [Symbol(kBuffer)]: null,
- [Symbol(kBufferCb)]: null,
- [Symbol(kBufferGen)]: null,
- [Symbol(kCapture)]: false,
- [Symbol(kSetNoDelay)]: true,
- [Symbol(kSetKeepAlive)]: false,
- [Symbol(kSetKeepAliveInitialDelay)]: 0,
- [Symbol(kBytesRead)]: 0,
- [Symbol(kBytesWritten)]: 0
- },
- _header: 'POST /images/generate HTTP/1.1\r\n' +
- 'Accept: application/json, text/plain, */*\r\n' +
- 'Content-Type: application/json\r\n' +
- 'User-Agent: axios/0.24.0\r\n' +
- 'Content-Length: 33\r\n' +
- 'Host: 127.0.0.1:9090\r\n' +
- 'Connection: close\r\n' +
- '\r\n',
- _keepAliveTimeout: 0,
- _onPendingData: [Function: nop],
- agent: Agent {
- _events: [Object: null prototype],
- _eventsCount: 2,
- _maxListeners: undefined,
- defaultPort: 80,
- protocol: 'http:',
- options: [Object: null prototype],
- requests: [Object: null prototype] {},
- sockets: [Object: null prototype],
- freeSockets: [Object: null prototype] {},
- keepAliveMsecs: 1000,
- keepAlive: false,
- maxSockets: Infinity,
- maxFreeSockets: 256,
- scheduling: 'lifo',
- maxTotalSockets: Infinity,
- totalSocketCount: 1,
- [Symbol(kCapture)]: false
- },
- socketPath: undefined,
- method: 'POST',
- maxHeaderSize: undefined,
- insecureHTTPParser: undefined,
- path: '/images/generate',
- _ended: true,
- res: IncomingMessage {
- _readableState: [ReadableState],
- _events: [Object: null prototype],
- _eventsCount: 3,
- _maxListeners: undefined,
- socket: [Socket],
- httpVersionMajor: 1,
- httpVersionMinor: 1,
- httpVersion: '1.1',
- complete: true,
- rawHeaders: [Array],
- rawTrailers: [],
- aborted: false,
- upgrade: false,
- url: '',
- method: null,
- statusCode: 405,
- statusMessage: 'METHOD NOT ALLOWED',
- client: [Socket],
- _consuming: false,
- _dumped: false,
- req: [Circular *1],
- responseUrl: 'http://127.0.0.1:9090/images/generate',
- redirects: [],
- [Symbol(kCapture)]: false,
- [Symbol(kHeaders)]: [Object],
- [Symbol(kHeadersCount)]: 10,
- [Symbol(kTrailers)]: null,
- [Symbol(kTrailersCount)]: 0
- },
- aborted: false,
- timeoutCb: null,
- upgradeOrConnect: false,
- parser: null,
- maxHeadersCount: null,
- reusedSocket: false,
- host: '127.0.0.1',
- protocol: 'http:',
- _redirectable: Writable {
- _writableState: [WritableState],
- _events: [Object: null prototype],
- _eventsCount: 2,
- _maxListeners: undefined,
- _options: [Object],
- _ended: true,
- _ending: true,
- _redirectCount: 0,
- _redirects: [],
- _requestBodyLength: 33,
- _requestBodyBuffers: [],
- _onNativeResponse: [Function (anonymous)],
- _currentRequest: [Circular *1],
- _currentUrl: 'http://127.0.0.1:9090/images/generate',
- [Symbol(kCapture)]: false
- },
- [Symbol(kCapture)]: false,
- [Symbol(kBytesWritten)]: 0,
- [Symbol(kEndCalled)]: true,
- [Symbol(kNeedDrain)]: false,
- [Symbol(corked)]: 0,
- [Symbol(kOutHeaders)]: [Object: null prototype] {
- accept: [Array],
- 'content-type': [Array],
- 'user-agent': [Array],
- 'content-length': [Array],
- host: [Array]
- },
- [Symbol(errored)]: null,
- [Symbol(kUniqueHeaders)]: null
- },
- response: {
- status: 405,
- statusText: 'METHOD NOT ALLOWED',
- headers: {
- 'content-type': 'text/html; charset=utf-8',
- allow: 'OPTIONS, HEAD, GET',
- 'content-length': '153',
- date: 'Mon, 20 Feb 2023 18:23:54 GMT',
- connection: 'close'
- },
- config: {
- transitional: [Object],
- adapter: [Function: httpAdapter],
- transformRequest: [Array],
- transformResponse: [Array],
- timeout: 0,
- xsrfCookieName: 'XSRF-TOKEN',
- xsrfHeaderName: 'X-XSRF-TOKEN',
- maxContentLength: -1,
- maxBodyLength: -1,
- validateStatus: [Function: validateStatus],
- headers: [Object],
- method: 'post',
- url: 'http://127.0.0.1:9090/images/generate',
- data: '{"text":"a house","format":"png"}'
- },
- request: <ref *1> ClientRequest {
- _events: [Object: null prototype],
- _eventsCount: 7,
- _maxListeners: undefined,
- outputData: [],
- outputSize: 0,
- writable: true,
- destroyed: false,
- _last: true,
- chunkedEncoding: false,
- shouldKeepAlive: false,
- maxRequestsOnConnectionReached: false,
- _defaultKeepAlive: true,
- useChunkedEncodingByDefault: true,
- sendDate: false,
- _removedConnection: false,
- _removedContLen: false,
- _removedTE: false,
- strictContentLength: false,
- _contentLength: 33,
- _hasBody: true,
- _trailer: '',
- finished: true,
- _headerSent: true,
- _closed: false,
- socket: [Socket],
- _header: 'POST /images/generate HTTP/1.1\r\n' +
- 'Accept: application/json, text/plain, */*\r\n' +
- 'Content-Type: application/json\r\n' +
- 'User-Agent: axios/0.24.0\r\n' +
- 'Content-Length: 33\r\n' +
- 'Host: 127.0.0.1:9090\r\n' +
- 'Connection: close\r\n' +
- '\r\n',
- _keepAliveTimeout: 0,
- _onPendingData: [Function: nop],
- agent: [Agent],
- socketPath: undefined,
- method: 'POST',
- maxHeaderSize: undefined,
- insecureHTTPParser: undefined,
- path: '/images/generate',
- _ended: true,
- res: [IncomingMessage],
- aborted: false,
- timeoutCb: null,
- upgradeOrConnect: false,
- parser: null,
- maxHeadersCount: null,
- reusedSocket: false,
- host: '127.0.0.1',
- protocol: 'http:',
- _redirectable: [Writable],
- [Symbol(kCapture)]: false,
- [Symbol(kBytesWritten)]: 0,
- [Symbol(kEndCalled)]: true,
- [Symbol(kNeedDrain)]: false,
- [Symbol(corked)]: 0,
- [Symbol(kOutHeaders)]: [Object: null prototype],
- [Symbol(errored)]: null,
- [Symbol(kUniqueHeaders)]: null
- },
- data: '<!doctype html>\n' +
- '<html lang=en>\n' +
- '<title>405 Method Not Allowed</title>\n' +
- '<h1>Method Not Allowed</h1>\n' +
- '<p>The method is not allowed for the requested URL.</p>\n'
- },
- isAxiosError: true,
- toJSON: [Function: toJSON]
- }
Advertisement
Add Comment
Please, Sign In to add comment