Jasonette / Jasonette/JASONETTE-Android
POST request with json data
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 266
- PR merge metrics
- No merged PRs in 30d
Description
I am integrating the authentication/ login screen using Jasoneete.
"https://www.jasonbase.com/things/1xWK.json"
Trying to set the headers with "content-type": "application/json" but unable to update the same, by default it is "application/x-www-form-urlencoded".
Need to send json data using POST request
Below is my code snippet
"text": "Login",
"action": {
"type": "$network.request",
"options": {
"url": "https:///employer_login.json",
"method": "post",
"data": {
"name": "{{$get.email}}",
"pass": "{{$get.password}}"
},
"data_type": "json",
"content_type": "json"
},
"success": {
"type": "$util.banner",
"options": {
"title": "{{$jason.status.message}}"
},
"success": {
"type": "$render"
},
"error": {
"type": "$util.alert",
"options": {
"title": "Error setting global"
}
}
},
"error": {
"type": "$util.alert",
"options": {
"title": "Error",
"description": "Email or Password is incorrect"
}
},
Contributor guide
Research direction
Start at the $network.request entry point and trace how the data_type and content_type options are converted into the Android request. Reproduce the POST against the supplied endpoint, then verify that the request uses JSON and the server receives the login fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100