mirror of
https://github.com/foss42/apidash.git
synced 2025-06-06 11:28:07 +08:00
Update for POST 2
This commit is contained in:
@ -398,7 +398,12 @@ import 'dart:convert' as convert;
|
|||||||
void main() async {
|
void main() async {
|
||||||
try {
|
try {
|
||||||
final data = convert.json.decode(r'''{
|
final data = convert.json.decode(r'''{
|
||||||
"text": "I LOVE Flutter"
|
"text": "I LOVE Flutter",
|
||||||
|
"flag": null,
|
||||||
|
"male": true,
|
||||||
|
"female": false,
|
||||||
|
"no": 1.2,
|
||||||
|
"arr": ["null", "true", "false", null]
|
||||||
}''');
|
}''');
|
||||||
final response = await dio.Dio.post(
|
final response = await dio.Dio.post(
|
||||||
'https://api.apidash.dev/case/lower',
|
'https://api.apidash.dev/case/lower',
|
||||||
|
@ -428,7 +428,12 @@ fun main() {
|
|||||||
val mediaType = "application/json".toMediaType()
|
val mediaType = "application/json".toMediaType()
|
||||||
|
|
||||||
val body = """{
|
val body = """{
|
||||||
"text": "I LOVE Flutter"
|
"text": "I LOVE Flutter",
|
||||||
|
"flag": null,
|
||||||
|
"male": true,
|
||||||
|
"female": false,
|
||||||
|
"no": 1.2,
|
||||||
|
"arr": ["null", "true", "false", null]
|
||||||
}""".toRequestBody(mediaType)
|
}""".toRequestBody(mediaType)
|
||||||
|
|
||||||
val request = Request.Builder()
|
val request = Request.Builder()
|
||||||
|
@ -326,7 +326,12 @@ print(data.decode("utf-8"))
|
|||||||
const expectedCode = r"""import http.client
|
const expectedCode = r"""import http.client
|
||||||
|
|
||||||
body = r'''{
|
body = r'''{
|
||||||
"text": "I LOVE Flutter"
|
"text": "I LOVE Flutter",
|
||||||
|
"flag": null,
|
||||||
|
"male": true,
|
||||||
|
"female": false,
|
||||||
|
"no": 1.2,
|
||||||
|
"arr": ["null", "true", "false", null]
|
||||||
}'''
|
}'''
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
|
Reference in New Issue
Block a user