mirror of
https://github.com/foss42/apidash.git
synced 2025-06-22 07:24:39 +08:00
Migrate to API Dash APIs
This commit is contained in:
@ -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",
|
||||
|
Reference in New Issue
Block a user