rejetto forum

Executing HFS scripts from curl

newbie · 6 · 2656

0 Members and 1 Guest are viewing this topic.

Offline newbie

  • Occasional poster
  • *
    • Posts: 39
    • View Profile
Hello,
How do I execute a HFS script from curl.
For e.g to create a folder, the HFS:_scripting_commands doc says that I need to use the script: mkdir|foldername

So, how do I use it in curl. I am trying to create a folder called: hfsserver:port/Parent/Child

I tried:
curl -u user:passwd hfsserver:port/Parent/ -XPOST -d "{mkdir|Child}"
and it didnt work.

Thanks.


Offline dj

  • Tireless poster
  • ****
    • Posts: 291
  • 👣 🐾
    • View Profile
    • PWAs
welcome,
I searched on the forum for you

Code: [Select]
curl "http://localhost/test/?mode=section^&id=ajax.mkdir"  --data "name=Child"


Offline newbie

  • Occasional poster
  • *
    • Posts: 39
    • View Profile
DJ, Thanks for your response.

So,
This didnt work:
curl "http://localhost/test/?mode=section^&id=ajax.mkdir"  --data "name=Child"

but this did:
curl "http://localhost/test/?mode=section&id=ajax.mkdir"  --data "name=Child"
Note the lack of the character ^

I think this gives me a good start on the rest of my reqs. The mkdir was the easiest of my req.
I think the HFS & its scripting capabilities is a powerful tool, but it would be really helpful, if there is an example section in the documentation describing how to get started after settings up the HFS server.
And, I am not talking about just to doing it on curl. There is a lot of documentation & snippets on the forum, but it wasnt clear to me how to get started in the first place.




Offline newbie

  • Occasional poster
  • *
    • Posts: 39
    • View Profile
Thank you Mars & SilentPliz for those links. Thats a lot of doc/information.

I have another question:
Does HFS support querying a path to check if its a:
- file
- folder
- symbolic link

And, if so how?

Thanks