macg Posted January 17, 2018 Share Posted January 17, 2018 Hi, I try to make a POST request in a "Run Script" Action using JS. I tried doing it with fetch() or an XMLHttpRequest but I get errors stating XMLHttpRequest and fetch are undefined variables. I think there's something I don't get about scripting yet and how they work and what we have access to. Hopefully somebody can enlighten me. cheers Link to comment
deanishe Posted January 17, 2018 Share Posted January 17, 2018 JS is a special case. A lot of the functions you’re used to using are properties of the browser environment. They don’t exist when the script is running in Alfred. I’d suggest using a language that does have HTTP libraries (Ruby, Python etc.) or using the curl command. Link to comment
macg Posted January 17, 2018 Author Share Posted January 17, 2018 Thx for the clarification @deanishe Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now