Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
3.3 kB
1
Indexable
Never
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJqV29yQmtIZ3dkejYtVHNtVF9mZHctblhvcVB3SjZoOXlRVkNTV3BtdzdnIn0.eyJleHAiOjE2OTU5MjA5MDksImlhdCI6MTY5NTkyMDYwOSwianRpIjoiMjExYmI2MmUtNmUyOS00NTA1LTk0MTMtZWVkOGVkMWEzMDVjIiwiaXNzIjoiaHR0cHM6Ly9wbi1jdi5uZXQ6ODQ0My9yZWFsbXMvcG4tdGVzdCIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJjZDA2MWMyMC05NWUzLTRhMzQtYjIyZC0yODQzZGQ5ZmYwNWYiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJzYXJiYSIsInNlc3Npb25fc3RhdGUiOiIwOTY3NjIzYi0xODlmLTRlNWItOWY2My1hNDRiZGJhNjBjY2EiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZl9zaXBlX3BzX2hpc3RvcmljbyIsImRlZl9hdHJfaGlzdG9yaWNvIiwiZGVmX2V0bl9hbmFsaXNlIiwiZGVmX2F0cl9hbmFsaXNlIiwiZGVmX2V0bl9oaXN0b3JpY28iLCJkZWZfc2lwZV9wc19hbmFsaXNlIiwiZGVmX2V0bl9wcm9wb3N0YSIsImRlZl9hdHJfdmFsaWRhY2FvIiwiZGVmX3NpcGVfcGNfYW5hbGlzZSIsImRlZl9zaXBlX3BkX2FuYWxpc2UiLCJkZWZfYXRyX2Rlc3BhY2hvIiwiZGVmX2V0bl9kZXNwYWNobyIsImRlZl9zaXBlX0lSX2hpc3RvcmljbyIsImRlZl9zaXBlX3BkX2hpc3RvcmljbyIsIm9mZmxpbmVfYWNjZXNzIiwiZGVmYXVsdC1yb2xlcy1wbi10ZXN0IiwidW1hX2F1dGhvcml6YXRpb24iLCJkZWZfc2lwZV9wY19oaXN0b3JpY28iLCJkZWZfc2lwZV9wc19kZXNwYWNobyJdfSwicmVzb3VyY2VfYWNjZXNzIjp7InNhcmJhIjp7InJvbGVzIjpbImFjY29tbW9kYXRpb25fbWFuYWdlbWVudCIsInJlZ2lzdHJhdGlvbl9yZXF1ZXN0Il19LCJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50IiwibWFuYWdlLWFjY291bnQtbGlua3MiLCJ2aWV3LXByb2ZpbGUiXX19LCJzY29wZSI6ImVtYWlsIHByb2ZpbGUiLCJzaWQiOiIwOTY3NjIzYi0xODlmLTRlNWItOWY2My1hNDRiZGJhNjBjY2EiLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwibmFtZSI6IkFkaWxzb24gQ29ycmVpYSIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkaWxzb24uY29ycmVpYSIsImdpdmVuX25hbWUiOiJBZGlsc29uIiwiZmFtaWx5X25hbWUiOiJDb3JyZWlhIiwiZW1haWwiOiJ0ZXN0ZUBwbi5jdiJ9.HljMLXVjTUhLk0G3YVMJ6tJEa9YEwNw3MOC3Mawmm7bN30IZy_F8gwVmVSTdMIDDwUeuYKbVtqo2KvUvcGzNQM8Chr0WHvUzdEp0eZd0U0vl9hU2VJNjkt7fEURblKqnK8D69i_2NDnhSTcwwF5a68OFqRsUPf82dTHOP7HsZccnuDjWyTaofYBKLWnl9s4pVQ-2PWGODgB-QtJJ71pnkPALO3tXUgQ78tFfoPKTHzT9Y1lMllfOy6A0f1UT3hsCK9xcvtolAxMRcVTiEFfM-ZtQxWXrC0nAcIwgWxo9oB5LwBQKnzptGAj4r_R5KJf1XMx9Mf4vGYhAiwwK87bEyA");

var raw = JSON.stringify({
  "personalInformation": {
    "name": "",
    "surname": "",
    "birthDate": "",
    "gender": "",
    "nationality": {
      "code_1": "",
      "code_2": "",
      "code_3": "",
      "nome": ""
    },
    "birthPlace": {
      "code_1": "",
      "code_2": "",
      "code_3": "",
      "nome": ""
    },
    "fatherName": "",
    "motherName": ""
  },
  "identificationDocument": {
    "number": "",
    "type": "",
    "issueCountry": {
      "code_1": "",
      "code_2": "",
      "code_3": "",
      "nome": ""
    }
  },
  "source": [
    {
      "name": "Mc",
      "enable": true,
      "page": {
        "page": "",
        "size": ""
      }
    },
    {
      "name": "Sarba",
      "enable": true,
      "page": {
        "page": "",
        "size": ""
      }
    },
    {
      "name": "Fronteira",
      "enable": true,
      "page": {
        "page": "",
        "size": ""
      }
    }
  ]
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("http://pn-cv.net:9098/advanced-search/avanced-search", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));