Can delete subdomain/script but not subdomain/folder/script

3 views
Skip to first unread message

Rahul Varshney

unread,
Aug 22, 2017, 8:44:55 PM8/22/17
to Webscript.io
The following script works:

local response = http.request {
method = 'DELETE',
auth = {
'************************'
}
}

print (response)

result:
DELETE https://www.webscript.io/api/0.1/script/978patent1/util:200
DELETE https://www.webscript.io/api/0.1/script/978patent1/util HTTP/1.1 Content-Length: 0 Authorization: Basic dmFyc2huZXlhbmRzb25zQGdtYWlsLmNvbTphMmZlZmM2M2Y1OGM0YzhjOWI2NWFjNmUyOGRiNGM5ZQ==
HTTP/1.1 200 content-length: 0 Content-Length: 0 server: nginx/1.10.1 connection: keep-alive date: Tue, 22 Aug 2017 23:20:45 GMT x-frame-options: SAMEORIGIN content-type: text/html; charset=utf-8
{'content': '', 'headers': {'content-length': '0', 'server': 'nginx/1.10.1', 'connection': 'keep-alive', 'date': 'Tue, 22 Aug 2017 23:20:45 GMT', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'text/html; charset=utf-8'}, 'statuscode': 200}

But the following script does not work:

local response = http.request {
method = 'DELETE',
auth = {
'************************'
}
}

print (response)


output:

DELETE https://www.webscript.io/api/0.1/script/978patent1/util/utilmod:405
DELETE https://www.webscript.io/api/0.1/script/978patent1/util/utilmod HTTP/1.1 Content-Length: 0 Authorization: Basic dmFyc2huZXlhbmRzb25zQGdtYWlsLmNvbTphMmZlZmM2M2Y1OGM0YzhjOWI2NWFjNmUyOGRiNGM5ZQ==
HTTP/1.1 405 content-length: 178 Content-Length: 178 server: nginx/1.10.1 connection: keep-alive allow: HEAD, GET, PUT, POST, OPTIONS date: Tue, 22 Aug 2017 21:27:57 GMT content-type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>405 Method Not Allowed</title> <h1>Method Not Allowed</h1> <p>The method is not allowed for the requested URL.</p>
{'content': '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\n<title>405 Method Not Allowed</title>\n<h1>Method Not Allowed</h1>\n<p>The method is not allowed for the requested URL.</p>\n', 'headers': {'content-length': '178', 'server': 'nginx/1.10.1', 'connection': 'keep-alive', 'allow': 'HEAD, GET, PUT, POST, OPTIONS', 'date': 'Tue, 22 Aug 2017 21:27:57 GMT', 'content-type': 'text/html'}, 'statuscode': 405}



I feel like I'm following the syntax properly:

Delete scriptDELETE/api/0.1/script/<subdomain>/<path>
(e.g. /api/0.1/script/examples/email)
Delete a script.

For now, my solution is simply not to place any scripts in sub-folders.

But I'd appreciate any insight into what's going on here.

~Rahul

Steve Marx

unread,
Aug 23, 2017, 11:18:36 AM8/23/17
to Rahul Varshney, Webscript.io
Replied on the thread with sup...@webscript.io, but to close the loop here too, this was a bug in Webscript itself which has now been fixed.


--
You received this message because you are subscribed to the Google Groups "Webscript.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webscriptio+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages