Deformed Post Data



  • Heyo Guys,

    I'm trying to post data

    {"operationName":"SignIn","variables":{"email":"<USERNAME>","password":"<PASSWORD>"},"query":"mutation SignIn($email: String!, $password: String!) {\n  login(email: $email, password: $password) {\n    token\n    error\n    user {\n      id\n      gender\n      avatarType\n      name\n      emailAddress\n      level\n      typename\n    }\n    typename\n  }\n}\n"}
    

    but when i post it

     {"operationName":"SignIn","variables":{"email":"[email protected]","password":"lol1234"},"query":"mutation SignIn($email: String!, $password: String!) {
      login(email: $email, password: $password) {
        token
        error
        user {
          id
          gender
          avatarType
          name
          emailAddress
          level
          typename
        }
        typename
      }
    }
    "}
    
    

    it comes like this. soo should i escape it or what?

    Any Suggestion/Help Would Be Appreciate!


  • Donator

    replace \n with \\n



  • {"operationName":"SignIn","variables":{"email":"<USER>","password":"<PASS>"},"query":"mutation SignIn($email: String!, $password: String!) { login(email: $email, password: $password) { token error user { id gender avatarType name emailAddress level typename } typename } } "}


  • Admin

    Are you using application/json content type?



  • @Ruri yes ruri! im using application/json content type.



  • @Itamai @mega_1 i have tried both ways but it did'nt work! still thanks for your time and help!


Log in to reply