ZAF request proxy can send form data?

Answered

4 Comments

  • Andriy Pelykh

    Hello Megumi,

    Could you please specify the content type in contentType: 'application/x-www-form-urlencoded', instead of headers?

    If it doesn't help, could you share more info from the Network tab about this request? Maybe it would help find out the issue. Because I think we can use form data in the ZAF request proxy.

    0
  • 中村 めぐみ

    Thanks Andriy,

    I changed content type to contentType in param, but it doesn't help. Failed in the same result.

    var options = {
    url: "https://d856-2409-11-4260-bd00-7deb-ca46-32cb-c21f.ngrok.io/",
    method: 'POST',
    secure: true,
    contentType: 'application/x-www-form-urlencoded',
    headers: {
    'X-API-Key': '{{setting.api_key}}'
    },
    data: "test=1234"
    };
    client.request(options);

    Network tab is below.

    Address and response header. The decoded url is "https://con-eclect-nakamura.zendesk.com/proxy/v2/apps/secure/https://d856-2409-11-4260-bd00-7deb-ca46-32cb-c21f.ngrok.io/?0=t&1=e&2=s&3=t&4==&5=1&6=2&7=3&8=4".

    Request header:

     

    Could you find something wrong?

    0
  • Andriy Pelykh

    Hello Megumi,

    I think the issue is in method:"POST". IT should be type: "POST" instead.

    var options = {
    url: "https://d856-2409-11-4260-bd00-7deb-ca46-32cb-c21f.ngrok.io/",
    type: 'POST',
    secure: true,
    contentType: 'application/x-www-form-urlencoded',
    headers: {
    'X-API-Key': '{{setting.api_key}}'
    },
    data: "test=1234"
    };
    client.request(options);
    0
  • 中村 めぐみ

    Hello Andriy, Thank you very much!

    I could send the request!! Thanks!!

    0

Please sign in to leave a comment.

Powered by Zendesk