Sponsored Content
Full Discussion: Perl HTTP::Tiny
Top Forums Shell Programming and Scripting Perl HTTP::Tiny Post 302977404 by azdps on Sunday 17th of July 2016 07:26:18 PM
Old 07-17-2016
Perl HTTP::Tiny

I'm currently using OpenBSD current as of yesterday. Both curl and wget aren't not part of the OpenBSD base and I would rather attempt to reboot my cable modem (SB6183) using perl HTTP:Tiny if possible. The following 2 commands work and both will reboot my modem:

Code:
curl -d Rebooting=1 http://192.168.100.1/goform/RgConfiguration

wget --post-data=Rebooting=1 http://192.168.100.1/goform/RgConfiguration

I would like to use the perl HTTP:Tiny module to reboot my router. Here is something I came up with that doesn't work. I need to implement post data Rebooting=1 for it to work but I can't figure that out:

Code:
perl -MHTTP::Tiny -E 'say HTTP::Tiny->new->post("http://192.168.100.1/goform/RgConfiguration")

Anyone have any ideas on proper HTTP::Tiny syntax so this will work?

Last edited by azdps; 07-17-2016 at 08:35 PM..
 

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Assistance with Perl and HTTP

I need to query a http site and then parse the xml results, this works well if I use the string in IE but I require an automated solution. I have tried using the following as well as HTTP::Request, nothing seems to work any suggestions would be appreciated, I have tried diffrnt things I found on... (7 Replies)
Discussion started by: bryanthomas
7 Replies

2. Shell Programming and Scripting

Perl Http Post over SSL

Hello, I'm using a tunnel broker for tunneling IPv6 traffic, as my ISP does not support it natively. As of recent i switched from Hurricane Electrics tunnel broker to Sixxs. Whenever my IP address changes, i have to manually log in and change it. This is a bit cumbersome so i was thinking of... (0 Replies)
Discussion started by: regexp
0 Replies

3. Shell Programming and Scripting

awk script to find time difference between HTTP PUT and HTTP DELETE requests in access.log

Hi, I'm trying to write a script to determine the time gap between HTTP PUT and HTTP DELETE requests in the HTTP Servers access log. Normally client will do HTTP PUT to push content e.g. file_1.txt and 21 seconds later it will do HTTP DELETE, but sometimes the time varies causing some issues... (3 Replies)
Discussion started by: Juha
3 Replies
CURLOPT_REFERER(3)					     curl_easy_setopt options						CURLOPT_REFERER(3)

NAME
CURLOPT_REFERER - set the HTTP referer header SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REFERER, char *where); DESCRIPTION
Pass a pointer to a zero terminated string as parameter. It will be used to set the Referer: header in the http request sent to the remote server. This can be used to fool servers or scripts. You can also set any custom header with CURLOPT_HTTPHEADER(3). The application does not have to keep the string around after setting this option. DEFAULT
NULL PROTOCOLS
HTTP EXAMPLE
CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); /* tell it where we found the link to this place */ curl_easy_setopt(curl, CURLOPT_REFERER, "http://example.com/aboutme.html"); curl_easy_perform(curl); } AVAILABILITY
If built with HTTP support RETURN VALUE
Returns CURLE_OK if HTTP support is enabled, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. SEE ALSO
CURLOPT_USERAGENT(3), CURLOPT_HTTPHEADER(3), libcurl 7.54.0 December 21, 2016 CURLOPT_REFERER(3)
All times are GMT -4. The time now is 07:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy