Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
ae4f8243
Commit
ae4f8243
authored
23 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
added some -c talk, spell checked
parent
1c83dee9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/TheArtOfHttpScripting
+23
-12
23 additions, 12 deletions
docs/TheArtOfHttpScripting
with
23 additions
and
12 deletions
docs/TheArtOfHttpScripting
+
23
−
12
View file @
ae4f8243
Online: http://curl.haxx.se/docs/httpscripting.shtml
Author: Daniel Stenberg <daniel@haxx.se>
Date:
August 20
, 2001
Version: 0.
4
Date:
October 31
, 2001
Version: 0.
5
The Art Of Scripting HTTP Requests Using Curl
=============================================
...
...
@@ -48,7 +48,7 @@ Version: 0.4
2. URL
The Uniform Resource Locator format is how you specify the address of a
particular resource on the
i
nternet. You know these, you've seen URLs like
particular resource on the
I
nternet. You know these, you've seen URLs like
http://curl.haxx.se or https://yourbank.com a million times.
3. GET a page
...
...
@@ -56,7 +56,7 @@ Version: 0.4
The simplest and most common request/operation made using HTTP is to get a
URL. The URL could itself refer to a web page, an image or a file. The client
issues a GET request to the server and receives the document it asked for.
If you isse the command line
If you iss
u
e the command line
curl http://curl.haxx.se
...
...
@@ -89,7 +89,7 @@ Version: 0.4
<input type=submit name=press value="OK">
</form>
In your favo
u
rite browser, this form will appear with a text box to fill in
In your favorite browser, this form will appear with a text box to fill in
and a press-button labeled "OK". If you fill in '1905' and press the OK
button, your browser will then create a new URL to get for you. The URL will
get "junk.cgi?birthyear=1905&press=OK" appended to the path part of the
...
...
@@ -136,8 +136,8 @@ Version: 0.4
4.3 FILE UPLOAD POST
Back in late 1995 they defined a new way to post data over HTTP. It was
documented in the RFC 1867, why this method sometimes is refered to as
a
rfc
1867-posting.
documented in the RFC 1867, why this method sometimes is refer
r
ed to as
a
RFC
1867-posting.
This method is mainly designed to better support file uploads. A form that
allows a user to upload a file could be written like this in HTML:
...
...
@@ -182,7 +182,7 @@ Version: 0.4
way your browser does.
An easy way to get to see this, is to save the HTML page with the form on
your local disk, mo
fid
y the 'method' to a GET, and press the submit button
your local disk, mo
dif
y the 'method' to a GET, and press the submit button
(you could also change the action URL if you want to).
You will then clearly see the data get appended to the URL, separated with a
...
...
@@ -214,7 +214,7 @@ Version: 0.4
Sometimes your HTTP access is only available through the use of a HTTP
proxy. This seems to be especially common at various companies. A HTTP proxy
may require its own user and password to allow the client to get through to
the
i
nternet. To specify those with curl, run something like:
the
I
nternet. To specify those with curl, run something like:
curl -U proxyuser:proxypassword curl.haxx.se
...
...
@@ -294,7 +294,7 @@ Version: 0.4
contents to the server, unless of course they are expired.
Many applications and servers use this method to connect a series of requests
into a single logical session. To be able to use curl in such occa
t
ions, we
into a single logical session. To be able to use curl in such occa
s
ions, we
must be able to record and send back cookies the way the web application
expects them. The same way browsers deal with them.
...
...
@@ -325,6 +325,15 @@ Version: 0.4
curl -b nada -L www.cookiesite.com
Curl has the ability to read and write cookie files that use the same file
format that Netscape and Mozilla do. It is a convenient way to share cookies
between browsers and automatic scripts. The -b switch automatically detects
if a given file is such a cookie file and parses it, and by using the
-c/--cookie-jar option you'll make curl write a new cookie file at the end of
an operation:
curl -b cookies.txt -c newcookies.txt www.cookiesite.com
11. HTTPS
There are a few ways to do secure HTTP transfers. The by far most common
...
...
@@ -349,7 +358,7 @@ Version: 0.4
you need to enter the unlock-code before the certificate can be used by
curl. The PIN-code can be specified on the command line or if not, entered
interactively when curl queries for it. Use a certificate with curl on a
https
server like:
HTTPS
server like:
curl -E mycert.pem https://that.secure.server.com
...
...
@@ -358,10 +367,12 @@ Version: 0.4
RFC 2616 is a must to read if you want in-depth understanding of the HTTP
protocol.
RFC 2396 explains the URL syntax
RFC 2396 explains the URL syntax
.
RFC 2109 defines how cookies are supposed to work.
RFC 1867 defines the HTTP post upload format.
http://www.openssl.org is the home of the OpenSSL project
http://curl.haxx.se is the home of the cURL project
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment