MCPcopy Create free account
hub / github.com/Azure/powershell / patchJson

Method patchJson

lib/index.js:2694–2702  ·  view source on GitHub ↗
(requestUrl, obj, additionalHeaders = {})

Source from the content-addressed store, hash-verified

2692 });
2693 }
2694 patchJson(requestUrl, obj, additionalHeaders = {}) {
2695 return __awaiter(this, void 0, void 0, function* () {
2696 const data = JSON.stringify(obj, null, 2);
2697 additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
2698 additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
2699 const res = yield this.patch(requestUrl, data, additionalHeaders);
2700 return this._processResponse(res, this.requestOptions);
2701 });
2702 }
2703 /**
2704 * Makes a raw http request.
2705 * All other methods such as get, post, patch, and request ultimately call this.

Callers

nothing calls this directly

Calls 4

patchMethod · 0.95
_processResponseMethod · 0.95
stringifyMethod · 0.80

Tested by

no test coverage detected