MCPcopy
hub / github.com/axios/axios / CustomFormData

Class CustomFormData

tests/unit/adapters/http.test.js:4444–4461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4442 }
4443
4444 class CustomFormData extends stream.Readable {
4445 _read() {
4446 this.push(null);
4447 }
4448 append() {}
4449 getHeaders() {
4450 return {
4451 'content-type': 'multipart/form-data; boundary=----fake',
4452 'x-injected': 'custom',
4453 'x-forwarded-for': '10.0.0.1',
4454 authorization: 'Bearer CUSTOM_TOKEN',
4455 host: 'custom.example.com',
4456 };
4457 }
4458 get [Symbol.toStringTag]() {
4459 return 'FormData';
4460 }
4461 }
4462
4463 it('preserves legacy getHeaders() propagation by default', async () => {
4464 let capturedHeaders;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected