Paraphrasing Tool

פרמיום
על ידי Healthy Tech | מְעוּדכָּן לפני 17 ימים | Text Analysis
פּוֹפּוּלָרִיוּת

9.4 / 10

חֶבִיוֹן

445ms

רמת שירות

100%

Health Check

N/A

חזרה לכל הדיונים

Unexpected token s in JSON at position 0<br> &nb

Rapid account: Malharlakdawala
malharlakdawala
לפני שנתיים

Hi

I am using this API with python… But I am getting below error

SyntaxError: Unexpected token s in JSON at position 0<br>    at JSON.parse (<anonymous>)<br>    at parse (/var/task/node_modules/body-parser/lib/types/js
on.js:89:19)<br>    at /var/task/node_modules/body-parser/lib/

My code as below:
url = “https://paraphrasing-tool1.p.rapidapi.com/api/rewrite

    payload = {"sourceText": sentence}
    headers = {
    'content-type': "application/json",
    'x-rapidapi-host': "paraphrasing-tool1.p.rapidapi.com",
    'x-rapidapi-key': "<API KEY>"
    }
    response = requests.request("POST", url, data=payload, headers=headers)
    print(response.text)

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות