Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/adagioBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ export const spec = {
const requests = Object.keys(groupedAdUnits).map(organizationId => {
return {
method: 'POST',
url: ENDPOINT,
url: `${ENDPOINT}?orgid=${organizationId}`,
data: {
organizationId: organizationId,
hasRtd: _internal.hasRtd() ? 1 : 0,
Expand Down Expand Up @@ -745,7 +745,7 @@ export const spec = {
usIfr: canSyncWithIframe
},
options: {
contentType: 'text/plain'
endpointCompression: true
}
};
});
Expand Down
14 changes: 12 additions & 2 deletions test/spec/modules/adagioBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,11 @@ describe('Adagio bid adapter', () => {
const bidderRequest = new BidderRequestBuilder().build();

const requests = spec.buildRequests([bid01], bidderRequest);
const expectedUrl = `${ENDPOINT}?orgid=1000`;

expect(requests).to.have.lengthOf(1);
expect(requests[0].method).to.equal('POST');
expect(requests[0].url).to.equal(ENDPOINT);
expect(requests[0].options.contentType).to.eq('text/plain');
expect(requests[0].url).to.equal(expectedUrl);
Comment thread
osazos marked this conversation as resolved.
expect(requests[0].data).to.have.all.keys(expectedDataKeys);
});

Expand Down Expand Up @@ -1137,6 +1137,16 @@ describe('Adagio bid adapter', () => {
});
})
})

describe('with endpoint compression', function() {
it('should always use the endpoint compression option', function() {
const bid01 = new BidRequestBuilder().withParams().build();
const bidderRequest = new BidderRequestBuilder().build();
const requests = spec.buildRequests([bid01], bidderRequest);
expect(requests[0].options).to.exist;
expect(requests[0].options.endpointCompression).to.equal(true);
});
});
});

describe('interpretResponse()', function() {
Expand Down
Loading