forked from rsdoiel/archivesspace-api-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path27-ArchivesSpace-API-Workshop.html
More file actions
32 lines (26 loc) · 996 Bytes
/
27-ArchivesSpace-API-Workshop.html
File metadata and controls
32 lines (26 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html>
<head>
<link href="css/slides.css" rel="stylesheet" />
</head>
<body>
<nav>
<a id="start-slide" rel="nav" href="00-ArchivesSpace-API-Workshop.html" title="Return to start of presentation">Start</a>
<a id="prev-slide" rel="nav" href="26-ArchivesSpace-API-Workshop.html" title="Previous slide">Prev</a>
<a id="next-slide" rel="nav" href="28-ArchivesSpace-API-Workshop.html" title="Next slide">Next</a>
</nav>
<section><h1>3. Authentication</h1>
<h1>Send our username and password</h1>
<p>Now send a request with our data.</p>
<pre><code class="language-python"> req = urllib.request.Request(
url = api_url+'/users/'+username+'/login',
data = data)
response = urllib.request.urlopen(req)
print(response.read().decode('UTF-8'))
</code></pre>
<p>You should see a response ArchivesSpace in the shell.</p>
<p>What does the response suggest?</p>
</section>
<script type="text/javascript" src="js/keyboard-nav.js"></script>
</body>
</html>