Android Question Need help with JSON

Discussion in 'Android Questions' started by juventino883, Jul 25, 2015.

  1. juventino883

    juventino883 Member Licensed User

    Hi, I try to send a JSON string but i dont know how to set the headers or how is the right way to send it, this is what i want to send:

    Code:
    JSON Examples
    Header: Authorization: Basic YWRtaW46MTIzNDU=
    Header: Content-
    Typeapplication/json

    POST http://example.org:
    9090/plugins/restapi/v1/users

    Payload Example 
    1 (required parameters):

    {
    "username""admin",
    "password""p4ssword"
    }

    Payload Example 2 (available parameters):

    {
    "username": "admin",
    "password": "p4ssword",
    "name": "Administrator",
    "email": "admin@example.com",
    "properties": {
    "property": [
    {
    "@key": "console.rows_per_page",
    "@value": "user-summary=8"
    },
    {
    "@key": "console.order",
    "@value": "session-summary=1"
    }
    ]
    }
    }

    If someone could help me with some code or example I would appreciate it, thanks in advance!.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

Loading...