Sponsored Content
Top Forums Shell Programming and Scripting Access a complete flow with CURL + bash shell Post 303019266 by apmcd47 on Tuesday 26th of June 2018 04:43:30 AM
Old 06-26-2018
Stupid question, but could you use the -c/--cookie-jar switch to save the cookies into a file?

Andrew
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

BASH complete-filename & menu-complete together

Hi, Does anyone know how to make BASH provide a list of possible completions on the first tab, and then start cycling through the possibilites on the next tab? Right now this is what I have in my .bashrc: bind "set show-all-if-ambiguous on" bind \\C-o:menu-complete This allows... (0 Replies)
Discussion started by: Mithu
0 Replies

2. Shell Programming and Scripting

Bash script idea using cUrl -- possible?

I have an alias already in my .bash_profile to download files using cUrl's -o (output to file, user provides the file name) option. I find I'm using it quite a bit, so I wanted to write a script to run "curl -o", taking the necessary inputs - file name and URL from which to download - and then... (3 Replies)
Discussion started by: SilversleevesX
3 Replies

3. Shell Programming and Scripting

bash curl escape & in url

I'm running a curl command in bash, but the & in the middle causes the second half of the line to run in the background, here's what I'm trying to do: lat="37.451" lon="-122.18" url="http://ws.geonames.org/findNearestAddress?lat=$lat&lng=$lon" curl -s "$url" I tried escaping the & with \&,... (4 Replies)
Discussion started by: unclecameron
4 Replies

4. Shell Programming and Scripting

Using Curl to Access PayPal

can anyone please help me with this? i know paypal is a secure site, so a code like the below would be needed. but that's where i get stuck. curl -s -K https://www.paypal.com I need to be able to curl to paypal and download a list of latest purchases. i know there HAS to be a way to do... (0 Replies)
Discussion started by: SkySmart
0 Replies

5. Shell Programming and Scripting

Help with make sure shell script execute instruction in flow

Hi, I want to write a shell script to make sure all the instruction is executive in flow. eg. I want my shell script to run finish this two progress first: ./program input_file_1.txt > input_file_1.txt.out & ./program input_file_2.txt > input_file_2.txt.out & After then, only run the... (1 Reply)
Discussion started by: edge_diners
1 Replies

6. Shell Programming and Scripting

Help with control flow in a Bash script

In my bash script I want to say "if argument 2 is anything except x, y or z, than echo this" (x y and z being words). So my script looks like this: if ] then echo "unrecognized input: $2" fi This usually works but than I also want to say "if argument 2 IS x, y, or z, but argument 4 is... (4 Replies)
Discussion started by: Jrodicon
4 Replies

7. Red Hat

Bash: menu-complete and reverse

Hi, In the archives I found this: And this works fine. $if mode=vi "\C-0-": digit-argument TAB: menu-complete "\e But what I want is to reverse this. So I want that tab does reverse menu completion and shift tab does normal menu completion. Can anyone help me with this? Thanks (0 Replies)
Discussion started by: ozkanb
0 Replies

8. Shell Programming and Scripting

Curl won't complete in a script but does from prompt. Idea?

On RHEL5 from within both a shell (sh->bash) and a csh script curl fails with a "curl: (6) Couldn't resolve host 'application'" error. This is the result whether run as a command at the shell and/or c-shell prompt and curl also fails with the same error when the scripts are "source'd" at the... (5 Replies)
Discussion started by: GSalisbury
5 Replies

9. Shell Programming and Scripting

Using curl in bash script

Hello. I have pick up a script from internet to track errors from curl command. #!/bin/bash # URL_TO_TEST="http://www.xxxxxx.yyy" MY_VAR=curl_init("$URL_TO_TEST") ; curl_setopt($MY_VAR, CURLOPT_HEADER, 1); curl_setopt($MY_VAR, CURLOPT_RETURNTRANSFER, 1); curl_setopt($MY_VAR,... (2 Replies)
Discussion started by: jcdole
2 Replies

10. Shell Programming and Scripting

Access a complete flow with CURL + bash shell

Hello Experts , I have an use case which needed your help . I have been using google for 2 days buy couldn`t succed , i believe i can get the help here. Here is my use case to run on bash shell 1. Access an URL -- in script , it will be mentioned as inputURL 2. Once i accessed the URL... (1 Reply)
Discussion started by: radha254
1 Replies
Cookie(3pm)						User Contributed Perl Documentation					       Cookie(3pm)

NAME
APR::Request::Cookie - wrapper for libapreq2's cookie API. SYNOPSIS
use APR::Request::Cookie; # fetch inbound cookie $jar = $req->jar; $cookie1 = $jar->get("cookie1"); # generate new cookie $cookie = APR::Request::Cookie->new($req->pool, name => "foo", value => "bar", domain => "capricorn.com"); print "$cookie"; # prints "bar" $cookie->domain("example.com"); # change domains $cookie->version(1); # upgrade it to conform with RFC 2109/2965. # send a response header print sprintf "Set-Cookie: %s ", $cookie->as_string; DESCRIPTION
The APR::Request::Cookie module provides base methods for interfacing with libapreq2's cookie API. It also provides a few utility functions and constants. This manpage documents version 2.13 of the APR::Request::Cookie package. OVERLOADS
APR::Request::Cookie "" "$cookie" The double-quote interpolation operator maps to "APR::Request::Cookie::value()". ok "$cookie" eq $cookie->value; METHODS
APR::Request::Cookie new APR::Request::Cookie->new($pool, name => $name, value => $value, %args) Creates a new cookie. Here $pool is an APR::Pool object, and $name is the cookie's name. The $value is transformed into the cookie's raw value through the class' "freeze()" method. The remaining arguments are optional: -secure -httponly -version -path -domain -port -expires -comment -commentURL For details on these arguments, please consult the corresponding method's documentation. freeze APR::Request::Cookie->freeze($value) Class method representing the default serializer; here it returns $value unmodified. ok "foo" eq APR::Request::Cookie->freeze("foo"); thaw $cookie->thaw() Reverses "freeze()"; here it simply returns $cookie->value since freeze() is a noop. ok $cookie->thaw eq $cookie->value; name $cookie->name() Fetch the cookie's name. This attribute cannot be modified and is never serialized; ie freeze() and thaw() do not act on the cookie's name. value $cookie->value() Fetch the cookie's raw (frozen) value. This attribute cannot be modified. secure $cookie->secure() $cookie->secure($set) Get/set the cookie's secure flag. $cookie->secure(1); ok $cookie->secure == 1; httponly $cookie->httponly() $cookie->httponly($set) Get/set the cookie's HttpOnly flag. $cookie->httponly(1); ok $cookie->httponly == 1; version $cookie->version() $cookie->version($set) Get/set the cookie's version number. Version 0 cookies conform to the Netscape spec; Version 1 cookies conform to either RFC 2109 or RFC 2965. $version = $cookie->version; $cookie->version(1); ok $cookie->version == 1; path $cookie->path() $cookie->path($set) Get/set the cookie's path string. $path = $cookie->path; $cookie->path("/1/2/3/4"); ok $cookie->path eq "/1/2/3/4"; domain $cookie->domain() $cookie->domain($set) Get/set the cookie's domain string. $domain = $cookie->domain; $cookie->domain("apache.org"); ok $cookie->domain eq "apache.org"; port $cookie->port() $cookie->port($set) Get/set the cookie's port string. Only valid for Version 1 cookies. $port = $cookie->port; $cookie->port(8888); ok $cookie->port == 8888; comment $cookie->comment() $cookie->comment($set) Get/set the cookie's comment string. Only valid for Version 1 cookies. $comment = $cookie->comment; $cookie->comment("quux"); ok $cookie->comment eq "quux"; commentURL $cookie->commentURL() $cookie->commentURL($set) Get/set the cookie's commentURL string. Only valid for Version 1 cookies. $commentURL = $cookie->commentURL; $cookie->commentURL("/foo/bar"); ok $cookie->commentURL eq "/foo/bar"; is_tainted $cookie->is_tainted() $cookie->is_tainted($set) Get/set the cookie's internal tainted flag. $tainted = $cookie->is_tainted; $cookie->is_tainted(1); ok $cookie->is_tainted == 1; make APR::Request::Cookie->make($pool, $name, $value) Fast XS cookie constructor invoked by "new()". The cookie's raw name & value are taken directly from the passed in arguments; no freezing/encoding is done on the $value. as_string $cookie->as_string() String representation of the cookie, suitable for inclusion in a "Set-Cookie" header. print "Set-Cookie: ", $cookie->as_string, " "; SUBROUTINES
APR::Request::Cookie expires expires($date_string) SEE ALSO
Apache2::Cookie, APR::Request. COPYRIGHT
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. perl v5.10.1 2011-02-28 Cookie(3pm)
All times are GMT -4. The time now is 04:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy