MCPcopy Create free account
hub / github.com/ambianic/peerfetch / post

Method post

javascript/src/peerfetch.ts:479–488  ·  view source on GitHub ↗

* * Similar to axious post(url, data, [config]) * * @see https://github.com/axios/axios#axiosposturl-data-config-1 * @see https://masteringjs.io/tutorials/axios/put * * @param {*} url resource URL for the PUT request * @param {*} data data payload for the PUT req

(url: string, json: string, data: any, config: any = {})

Source from the content-addressed store, hash-verified

477 * @param {*} config request header options
478 */
479 async post (url: string, json: string, data: any, config: any = {}) {
480 console.debug('POST', { url, data, config })
481 config.url = url
482 config.method = 'POST'
483 config.json = json
484 config.data = data
485 const response = this.request(config)
486 console.debug('post() received response', { response })
487 return response
488 }
489
490 /**
491 *

Callers 1

_fetchFunction · 0.80

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected