Recent version of FDK doesn't allow iparam as part of the URL in client.request

Hello,
I have been using the client.request method where the URL is passed as

    var url = `<%= iparam.fs_base%>/api/leads/${this.id}`
    var data = await client.request.get(url, { headers: ...})

This used to work some time back, but recently it fails with the error “Invalid URL” . I also tried making the host configurable and adding https to the string but then it fails with the error “URL must be FQDN”.

Will this be fixed in future versions of the FDK or would there be an alternate way to handle this?

HI @avinash,

Can you please let us know from when are you see this error? I will try to refer to any recent FDK releases.

It doesnt work on 6.5.4 but works on 6.5.2
I haven’t tested on 6.5.3

@Saif I have this issue in 6.6.3 as well.
I tried removing https from the config and moving it to the request but then the error is that URL must be FQDN.

    var url = `https://<%= iparam.fs_base%>/api/leads/${this.id}`
    var data = await client.request.get(url, { headers: ...})

Downgrading to 6.5.2 but would really like this to be fixed (or have a proposed solution)

2 Likes

Hi @avinash,

I will have this reported to the our QA team and keep you posted on the updates.

Hi @avinash,

Can you maybe simply try adding another space?

From

To
var url = <%= iparam.fs_base %>/api/leads/${this.id}

We have seen some issues in the past related to parsing.

See if this assumption works?

1 Like

I am had the same issue here
image

client.iparams.get(“api_url”)

Used the above function and it worked for me

1 Like