Skip to content

POST request with json data #248

Description

@drupalsr

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"
}
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions