Jasonette / Jasonette/JASONETTE-Android
$network.request with method POST (appears to) disregard the "content_type": "json"
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 266
- PR merge metrics
- No merged PRs in 30d
Description
the action below on iOS sends (correctly) JSON encoded data of the form
```
print request.data
{"object_type":"news","action_type":"like","object_id":"42"}
```
However, on Android the data is form encoded
```
print request.data
object_id=42&object_type=news&action_type=like
```
```
"action": {
"type": "$network.request",
"options": {
"url": "https://kadist-ios.herokuapp.com/action",
"method": "post",
"content_type": "json",
"data": {
"action_type": "like",
"object_type": "news",
"object_id": "{{$get.permalink}}"
}
}
}
```
Contributor guide
Research direction
Start by tracing the Android implementation of the $network.request action for POST requests and its handling of the content_type option. Compare the request serialization with the iOS behavior shown in the issue; done means a POST using content_type "json" sends a JSON body on Android as well.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- api, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100