Tags:
create new tag
view all tags

SID-01930: Help using SAVE script for auto update

Status: Answered Answered TWiki version: 6.0.0 Perl version:
Category: CategoryAPI Server OS: Last update: 11 years ago

It seems i'm supposed to be able to do:

curl -v -X POST --form "text=foo;name=ABC;method=post;username=maxabrahams;password=XXX" /twiki-link/twiki/bin/save/Sandbox/ABC

to make a new topic ABC or update ABC if it exits

but it doesn't work. Any advice?

Shell Dump:

curl -v -X POST --form "text=foo;name=ABC;method=post;username=maxabrahams;password=XXX" /twiki-link/twiki/bin/save/Sandbox/ABC
* About to connect() to twiki.iscinternal.com port 80 (#0)
*   Trying 172.16.96.158... connected
* Connected to twiki.iscinternal.com (172.16.96.158) port 80 (#0)
> POST /twiki/bin/save/Sandbox/ABC HTTP/1.1
> User-Agent: curl/7.19.0 (x86_64-suse-linux-gnu) libcurl/7.19.0 OpenSSL/0.9.8h zlib/1.2.3 libidn/1.10
> Host: twiki.iscinternal.com
> Accept: */*
> Content-Length: 204
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=----------------------------b328988ce9d0
> 
< HTTP/1.1 100 Continue
< HTTP/1.1 302 Found
< Date: Mon, 02 Jun 2014 15:42:43 GMT
< Server: Apache/2.2.15 (CentOS)
< Set-Cookie: TWIKISID=eb8b57f6f5e79e6343af011d1616a5ba; path=/
< Location: /twiki/bin/login/Sandbox/ABC?twiki_redirect_cache=5c0bce54a11d50a1eadb1ac41f83c472
< Content-Length: 0
< Connection: close
< Content-Type: text/html; charset=ISO-8859-1
< 
* Closing connection #0

-- TWiki Guest - 2014-06-02

Discussion and Answer

I did not mean to post as guest, this is my real account.

-- max abrahams - 2014-06-02

As you can see TWiki redirects to the login page. I am not familiar with curl, not sure how to handle login sessions with curl.

Did you see the ConnectByRestPlugin?

-- Peter Thoeny - 2014-06-02

I am glad it worked out (via TWikiIRC.)

-- Peter Thoeny - 2014-06-02

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title Help using SAVE script for auto update
SupportCategory CategoryAPI
TWiki version 6.0.0
Server OS

Web server

Perl version

Browser & version

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2014-06-02 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.