mirror of
https://github.com/foss42/apidash.git
synced 2025-06-01 14:58:28 +08:00
added C libcurl in the readme.d file
This commit is contained in:
@ -347,6 +347,150 @@ println("Response Body:", String(response.body))
|
||||
url = "https://api.apidash.dev/case/lower"
|
||||
|
||||
|
||||
payload = Dict(
|
||||
"text"=> "I LOVE Flutter"
|
||||
)
|
||||
|
||||
headers = Dict(
|
||||
"User-Agent"=> "Test Agent"
|
||||
)
|
||||
|
||||
response = HTTP.post(url, JSON.json(payload), headers=headers)
|
||||
|
||||
println("Status Code:", response.status)
|
||||
println("Response Body:", String(response.body))
|
||||
""";
|
||||
expect(
|
||||
codeGen.getCode(
|
||||
CodegenLanguage.juliaHttp, requestModelPost3, "https"),
|
||||
expectedCode);
|
||||
});
|
||||
test('POST 4', () {
|
||||
const expectedCode = r"""using HTTP,JSON
|
||||
|
||||
url = "https://api.apidash.dev/case/lower"
|
||||
|
||||
|
||||
payload = Dict(
|
||||
"text"=> "I LOVE Flutter"
|
||||
)
|
||||
|
||||
headers = Dict(
|
||||
"User-Agent"=> "Test Agent"
|
||||
)
|
||||
|
||||
response = HTTP.post(url, JSON.json(payload), headers=headers)
|
||||
|
||||
println("Status Code:", response.status)
|
||||
println("Response Body:", String(response.body))
|
||||
""";
|
||||
expect(
|
||||
codeGen.getCode(
|
||||
CodegenLanguage.juliaHttp, requestModelPost3, "https"),
|
||||
expectedCode);
|
||||
});
|
||||
test('POST 5', () {
|
||||
const expectedCode = r"""using HTTP,JSON
|
||||
|
||||
url = "https://api.apidash.dev/case/lower"
|
||||
|
||||
|
||||
payload = Dict(
|
||||
"text"=> "I LOVE Flutter"
|
||||
)
|
||||
|
||||
headers = Dict(
|
||||
"User-Agent"=> "Test Agent"
|
||||
)
|
||||
|
||||
response = HTTP.post(url, JSON.json(payload), headers=headers)
|
||||
|
||||
println("Status Code:", response.status)
|
||||
println("Response Body:", String(response.body))
|
||||
""";
|
||||
expect(
|
||||
codeGen.getCode(
|
||||
CodegenLanguage.juliaHttp, requestModelPost3, "https"),
|
||||
expectedCode);
|
||||
});
|
||||
test('POST 5', () {
|
||||
const expectedCode = r"""using HTTP,JSON
|
||||
|
||||
url = "https://api.apidash.dev/case/lower"
|
||||
|
||||
|
||||
payload = Dict(
|
||||
"text"=> "I LOVE Flutter"
|
||||
)
|
||||
|
||||
headers = Dict(
|
||||
"User-Agent"=> "Test Agent"
|
||||
)
|
||||
|
||||
response = HTTP.post(url, JSON.json(payload), headers=headers)
|
||||
|
||||
println("Status Code:", response.status)
|
||||
println("Response Body:", String(response.body))
|
||||
""";
|
||||
expect(
|
||||
codeGen.getCode(
|
||||
CodegenLanguage.juliaHttp, requestModelPost3, "https"),
|
||||
expectedCode);
|
||||
});
|
||||
test('POST 7', () {
|
||||
const expectedCode = r"""using HTTP,JSON
|
||||
|
||||
url = "https://api.apidash.dev/case/lower"
|
||||
|
||||
|
||||
payload = Dict(
|
||||
"text"=> "I LOVE Flutter"
|
||||
)
|
||||
|
||||
headers = Dict(
|
||||
"User-Agent"=> "Test Agent"
|
||||
)
|
||||
|
||||
response = HTTP.post(url, JSON.json(payload), headers=headers)
|
||||
|
||||
println("Status Code:", response.status)
|
||||
println("Response Body:", String(response.body))
|
||||
""";
|
||||
expect(
|
||||
codeGen.getCode(
|
||||
CodegenLanguage.juliaHttp, requestModelPost3, "https"),
|
||||
expectedCode);
|
||||
});
|
||||
test('POST 8', () {
|
||||
const expectedCode = r"""using HTTP,JSON
|
||||
|
||||
url = "https://api.apidash.dev/case/lower"
|
||||
|
||||
|
||||
payload = Dict(
|
||||
"text"=> "I LOVE Flutter"
|
||||
)
|
||||
|
||||
headers = Dict(
|
||||
"User-Agent"=> "Test Agent"
|
||||
)
|
||||
|
||||
response = HTTP.post(url, JSON.json(payload), headers=headers)
|
||||
|
||||
println("Status Code:", response.status)
|
||||
println("Response Body:", String(response.body))
|
||||
""";
|
||||
expect(
|
||||
codeGen.getCode(
|
||||
CodegenLanguage.juliaHttp, requestModelPost3, "https"),
|
||||
expectedCode);
|
||||
});
|
||||
test('POST 9', () {
|
||||
const expectedCode = r"""using HTTP,JSON
|
||||
|
||||
url = "https://api.apidash.dev/case/lower"
|
||||
|
||||
|
||||
payload = Dict(
|
||||
"text"=> "I LOVE Flutter"
|
||||
)
|
||||
|
Reference in New Issue
Block a user