mirror of
https://github.com/foss42/apidash.git
synced 2025-05-31 14:23:45 +08:00
Update for POST 2
This commit is contained in:
@ -398,7 +398,12 @@ import 'dart:convert' as convert;
|
||||
void main() async {
|
||||
try {
|
||||
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(
|
||||
'https://api.apidash.dev/case/lower',
|
||||
|
@ -428,7 +428,12 @@ fun main() {
|
||||
val mediaType = "application/json".toMediaType()
|
||||
|
||||
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)
|
||||
|
||||
val request = Request.Builder()
|
||||
|
@ -326,7 +326,12 @@ print(data.decode("utf-8"))
|
||||
const expectedCode = r"""import http.client
|
||||
|
||||
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 = {
|
||||
|
Reference in New Issue
Block a user