Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1e0edda

Browse files
Merge pull request 4GeeksAcademy#24 from josemoracard/jose3-exercises
todos los ejercicios, .gitignore, learn.json
2 parents 1b12a8e + 0bb603d commit 1e0edda

File tree

75 files changed

+599
-354
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+599
-354
lines changed

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
!/exercises
1616
!/exercises/*
17+
exercises/*/__pycache__/
1718

1819
!/.learn
1920
/.learn/**

‎exercises/00-hello-world/README.es.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎exercises/00-hello-world/README.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎exercises/00-welcome/README.es.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# `00` Welcome to Python API Requests!
2+
3+
Python Requests es una herramienta potente y ampliamente utilizada para interactuar con APIs y realizar solicitudes HTTP en aplicaciones Python. Simplifica el proceso de enviar solicitudes HTTP y manejar respuestas, convirtiéndose en una herramienta favorita entre los desarrolladores para integrarse con servicios web y obtener datos de APIs.
4+
5+
Con Python Requests, puedes hacer fácilmente solicitudes GET, POST, PUT, DELETE para comunicarte con servidores web y obtener datos. Admite el manejo de autenticación, encabezados, cookies y sesiones, permitiendo una integración sin problemas con diversos servicios web.
6+
7+
Aquí aprenderás:
8+
9+
1. ¿Cómo hacer solicitudes GET?
10+
2. ¿Cómo obtener propiedades de datos e información?
11+
3. ¿Cómo configurar request headers?
12+
4. ¿Cómo configurar request content-type?
13+
5. ¿Cómo hacer solicitudes POST?
14+
15+
Haga clic en el botón `Next →` en la esquina superior derecha para continuar.

‎exercises/00-welcome/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# `00` Welcome to Python API Requests!
2+
3+
Python Requests is a powerful and widely-used package for interacting with APIs and performing HTTP requests in Python applications. It simplifies the process of sending HTTP requests and handling responses, making it a favorite tool among developers for integrating with web services and fetching data from APIs.
4+
5+
With Python Requests, you can easily make GET, POST, PUT, DELETE, to communicate with web servers and retrieve data. It supports handling authentication, headers, cookies, and sessions, allowing for seamless integration with various web services.
6+
7+
Here you will learn:
8+
9+
1. How to do GET requests?
10+
2. How to fetch data properties and information?
11+
3. How to set request headers?
12+
4. How to set request content-type?
13+
5. How to do POST requests?
14+
15+
Click the `Next →` button on the top right to continue.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# `01` Creating a Request
2+
3+
Python tiene integrado un [paquete de solicitudes (*requests package*)](https://requests.readthedocs.io/en/master/) eso permite a los desarrolladores crear solicitudes HTTP con bastante facilidad.
4+
5+
Así es como en Python hacemos una solicitud HTTP GET:
6+
7+
```python
8+
response = requests.get('<destination url>')
9+
print(response.status_code)
10+
```
11+
12+
## 📝 Instrucciones:
13+
14+
Actualiza la variable `url` para que solicite a esta dirección:
15+
16+
```bash
17+
https://assets.breatheco.de/apis/fake/sample/hello.php
18+
```
19+
20+
> Nota: La consola debe imprimir un código de estado 200.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 01 Creating a request
1+
# `01` Creating a Request
22

33
Python has a [requests package](https://requests.readthedocs.io/en/master/) that allows developers to create HTTP request pretty easily.
44

@@ -9,12 +9,12 @@ response = requests.get('<destination url>')
99
print(response.status_code)
1010
```
1111

12-
# 📝 Instructions
12+
## 📝 Instructions:
1313

14-
Change the variable urlto make it request to:
14+
Update the `url` variable to make it request to this address:
1515

16-
```bash
16+
```text
1717
https://assets.breatheco.de/apis/fake/sample/hello.php
1818
```
1919

20-
Note: The console should print a 200 status code.
20+
> Note: The console should print a 200 status code.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import requests
2+
3+
url = "https://assets.breatheco.de/apis/fake/sample/hello.php"
4+
response = requests.get(url)
5+
6+
print("The response status is: "+str(response.status_code))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /