Hi, i am consuming a REST API for our app, the API i'm consuming has a parameter in the path, the parameter i'm sending is a UTXO id which has a colon at the end of it.
`b8d7783b15c6e9594b3e0ef97ba9c68c18bdc3d5108745818a0a129dda6f714E:0`
it turns out like `b8d7783b15c6e9594b3e0ef97ba9c68c18bdc3d5108745818a0a129dda6f714E%3A0`
it's not like i can do anything about it, i need to consume it like this. isn't really a workaround for this?
Hi, in the OnBeforeRequest handler after the default assignment add a Replace action to replace the encoded semi-colon.
Replace(CustomizedRequest.URLPath,"%3A",":")
this did actually worked, thanks, the point is to do Replace(CustomizedRequest.URLPath,"%3A",":")
i was using wrong property of CustomizedRequest
it was working thanks
Hi
Can you try onBeforeRequest callback method. In this method try to replace the %3A with :
Not sure it will work or not but can give one try.
regards
Hi,
As you are passing this value in URL so its getting replace due to HTML URL encoding. But I guess it should work fine. What error you are getting exactly.
hi, thanks for the response, correct, it gets encoded. and thats the issue, the host expects to get the value as it is (with the colon) "4E:0" not "4E%3A0"
tried, no luck, probably encoding happens after that point
Hi Alireza,
I think then submitting the request manually can help here.
Like we can use http methods from HTTPRequestHandler extension. Before calling the API append the value in URL manually using StringBuilder_append method in text. Then pass that string url directly to postSubmit method of httprequesthandler.
shall give it a try, thanks
Yes, we should try this way if not getting any other better idea.