URL encoding and HTTPS File retrieval method in data source
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2019 03:33 PM
Hello.
I'm, trying to import a CSV report via https URL.
When I try To download the file with the browser I don't need to provide any credentials because of the token that already in the URL and it expires after a while.
I want to download and process the file with the data source by using the HTTPS File retrieval method, but when I put the URL in the server+file path fields and try to import it. I get an error.
I've noticed that the URL that I get with the error is not similar to the URL I provided and it tried to encode it. for example, my original URL contains this string :
%2Fm%
And the URL with the error replacing the original string with this:
%252Fm
I guess the data source tries to decode special chars but I would like to avoid it because it fails.
Things I've tried:
1. Use a get method in rest web service - The same error with the data source.
2. Use decodeURIComponent('THE URL STRING'), and put the result in the file path in the data source - still, I'm getting an error
3. Create a CURL rest command with the MID server to download the file locally - I was managed to download the file successfully but I don't want to use the mid server.
4. Put the URL in postman - successfully download the file.
Thank you.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2019 05:24 AM
I'm wondering if this is an authentication issue as indicated by 403 status.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2019 04:45 PM
No it's not.
I can download the file after copying and pasting it in the browser.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2019 03:59 AM
you mentioned that you used postman to test the URL, what kind of auth did you use?