You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exercises/04-response-body-json/README.es.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,15 +22,15 @@ Response body:
22
22
}
23
23
```
24
24
25
-
Haga una solicitud GET a ese endpoint e imprime la hora en la consola con este formato:
25
+
1. Haz una solicitud GET a ese endpoint e imprime la hora en la consola con este formato:
26
26
27
27
```bash
28
28
Current time: 17 hrs 06 min and 23 sec
29
29
```
30
30
31
31
## 💡 Pistas:
32
32
33
-
1. Usa el [metodo .json()](https://www.w3schools.com/python/ref_requests_response.asp) para obtener el response body como un diccionario y almacenarlo en una variable.
34
-
2. Obtenga las propiedades `hours`, `minutes` y `seconds` del diccionario.
35
-
3. Concatenar todo de esta manera: `Hora actual: 17 h 06 min y 23 seg`.
33
+
+ Usa el [metodo .json()](https://www.w3schools.com/python/ref_requests_response.asp) para obtener el response body como un diccionario y almacenarlo en una variable.
34
+
+ Obtenga las propiedades `hours`, `minutes` y `seconds` del diccionario.
35
+
+ Concatenar todo de esta manera: `Hora actual: 17 h 06 min y 23 seg`.
Copy file name to clipboardExpand all lines: exercises/04-response-body-json/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# `04` Response JSON
2
2
3
-
But having a text based response is not very useful, that is why API's normally respond in CSV, JSON, YAML or XML format.
3
+
But having a text based response is not very useful, that is why APIs normally respond in CSV, JSON, YAML or XML format.
4
4
5
5
## 📝 Instructions:
6
6
@@ -22,15 +22,15 @@ Response body:
22
22
}
23
23
```
24
24
25
-
Please do a GET request to that endpoint and print the time on the console with this format:
25
+
1.Please do a GET request to that endpoint and print the time on the console with this format:
26
26
27
27
```text
28
28
Current time: 17 hrs 06 min and 23 sec
29
29
```
30
30
31
31
## 💡 Hints:
32
32
33
-
1. Use the [.json() method](https://www.w3schools.com/python/ref_requests_response.asp) to get the response body as a dictionary and store it in a variable.
34
-
2. Get the `hours`, `minutes` and `seconds` properties from the dictionary.
35
-
3. Concatenate everything together like this: `Current time: 17 hrs 06 min and 23 sec`.
33
+
+ Use the [.json() method](https://www.w3schools.com/python/ref_requests_response.asp) to get the response body as a dictionary and store it in a variable.
34
+
+ Get the `hours`, `minutes` and `seconds` properties from the dictionary.
35
+
+ Concatenate everything together like this: `Current time: 17 hrs 06 min and 23 sec`.
0 commit comments