diff --git a/modules/admixerBidAdapter.js b/modules/admixerBidAdapter.js index 5c01152200e..bb9a6dd44a3 100644 --- a/modules/admixerBidAdapter.js +++ b/modules/admixerBidAdapter.js @@ -46,11 +46,10 @@ export const spec = { Object.keys(bid).forEach(key => imp[key] = bid[key]); payload.imps.push(imp); }); - const payloadString = JSON.stringify(payload); return { - method: 'GET', + method: 'POST', url: endpointUrl || ENDPOINT_URL, - data: `data=${payloadString}`, + data: payload, }; }, /** diff --git a/test/spec/modules/admixerBidAdapter_spec.js b/test/spec/modules/admixerBidAdapter_spec.js index 27dc895e3a4..6dfde0d0652 100644 --- a/test/spec/modules/admixerBidAdapter_spec.js +++ b/test/spec/modules/admixerBidAdapter_spec.js @@ -67,7 +67,7 @@ describe('AdmixerAdapter', function () { it('should add referrer and imp to be equal bidRequest', function () { const request = spec.buildRequests(validRequest, bidderRequest); - const payload = JSON.parse(request.data.substr(5)); + const payload = request.data; expect(payload.referrer).to.not.be.undefined; expect(payload.imps[0]).to.deep.equal(validRequest[0]); }); @@ -75,7 +75,7 @@ describe('AdmixerAdapter', function () { it('sends bid request to ENDPOINT via GET', function () { const request = spec.buildRequests(validRequest, bidderRequest); expect(request.url).to.equal(ENDPOINT_URL); - expect(request.method).to.equal('GET'); + expect(request.method).to.equal('POST'); }); it('sends bid request to CUSTOM_ENDPOINT via GET', function () { @@ -85,7 +85,7 @@ describe('AdmixerAdapter', function () { }); const request = config.runWithBidder(BIDDER_CODE, () => spec.buildRequests(validRequest, bidderRequest)); expect(request.url).to.equal(ENDPOINT_URL_CUSTOM); - expect(request.method).to.equal('GET'); + expect(request.method).to.equal('POST'); }); });