Migrate to API Dash APIs

This commit is contained in:
Ashita Prasad
2024-03-08 10:30:33 +05:30
parent 9841f488ec
commit 96be5453f8
23 changed files with 218 additions and 217 deletions

View File

@ -8,7 +8,7 @@ void main() {
group('GET Request', () {
test('GET 1', () {
const expectedCode = r"""let config = {
url: 'https://api.foss42.com',
url: 'https://api.apidash.dev',
method: 'get'
};
@ -29,7 +29,7 @@ axios(config)
test('GET 2', () {
const expectedCode = r"""let config = {
url: 'https://api.foss42.com/country/data',
url: 'https://api.apidash.dev/country/data',
method: 'get',
params: {
"code": "US"
@ -53,7 +53,7 @@ axios(config)
test('GET 3', () {
const expectedCode = r"""let config = {
url: 'https://api.foss42.com/country/data',
url: 'https://api.apidash.dev/country/data',
method: 'get',
params: {
"code": "IND"
@ -77,7 +77,7 @@ axios(config)
test('GET 4', () {
const expectedCode = r"""let config = {
url: 'https://api.foss42.com/humanize/social',
url: 'https://api.apidash.dev/humanize/social',
method: 'get',
params: {
"num": "8700000",
@ -156,7 +156,7 @@ axios(config)
test('GET 7', () {
const expectedCode = r"""let config = {
url: 'https://api.foss42.com',
url: 'https://api.apidash.dev',
method: 'get'
};
@ -204,7 +204,7 @@ axios(config)
test('GET 9', () {
const expectedCode = r"""let config = {
url: 'https://api.foss42.com/humanize/social',
url: 'https://api.apidash.dev/humanize/social',
method: 'get',
params: {
"num": "8700000",
@ -229,7 +229,7 @@ axios(config)
test('GET 10', () {
const expectedCode = r"""let config = {
url: 'https://api.foss42.com/humanize/social',
url: 'https://api.apidash.dev/humanize/social',
method: 'get',
headers: {
"User-Agent": "Test Agent"
@ -258,7 +258,7 @@ axios(config)
test('GET 11', () {
const expectedCode = r"""let config = {
url: 'https://api.foss42.com/humanize/social',
url: 'https://api.apidash.dev/humanize/social',
method: 'get',
params: {
"num": "8700000",
@ -286,7 +286,7 @@ axios(config)
test('GET 12', () {
const expectedCode = r"""let config = {
url: 'https://api.foss42.com/humanize/social',
url: 'https://api.apidash.dev/humanize/social',
method: 'get'
};
@ -309,7 +309,7 @@ axios(config)
group('HEAD Request', () {
test('HEAD 1', () {
const expectedCode = r"""let config = {
url: 'https://api.foss42.com',
url: 'https://api.apidash.dev',
method: 'head'
};
@ -330,7 +330,7 @@ axios(config)
test('HEAD 2', () {
const expectedCode = r"""let config = {
url: 'http://api.foss42.com',
url: 'http://api.apidash.dev',
method: 'head'
};
@ -353,7 +353,7 @@ axios(config)
group('POST Request', () {
test('POST 1', () {
const expectedCode = r"""let config = {
url: 'https://api.foss42.com/case/lower',
url: 'https://api.apidash.dev/case/lower',
method: 'post',
headers: {
"Content-Type": "text/plain"
@ -378,7 +378,7 @@ axios(config)
test('POST 2', () {
const expectedCode = r"""let config = {
url: 'https://api.foss42.com/case/lower',
url: 'https://api.apidash.dev/case/lower',
method: 'post',
headers: {
"Content-Type": "application/json"
@ -403,7 +403,7 @@ axios(config)
test('POST 3', () {
const expectedCode = r"""let config = {
url: 'https://api.foss42.com/case/lower',
url: 'https://api.apidash.dev/case/lower',
method: 'post',
headers: {
"Content-Type": "application/json",