Comments (2)
Resolved my issue, thanks :)
from fake-store-api.
Hi @dawwit0001! I think the problem is the lastname
parameter and change the data method parameter to json, like the example below:
import requests
x = requests.put('https://fakestoreapi.com/users/7',
json={
'email': '[email protected]',
'username': 'johnd',
'password': 'password',
'name': {
'firstname': 'John',
'lastname': 'Doe'
},
'address': {
'city': 'kilcoole',
'street': '7835 new road',
'number': '3',
'geolocation': {
'lat': '-37.3159',
'long': '81.1496'
}
},
'phone': '1-570-236-7033'
})
print(x)
For Postman, import this cURL:
curl --location --request PUT 'https://fakestoreapi.com/users/7' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "[email protected]",
"username": "johnd",
"password": "password",
"name": {
"firstname": "John",
"lastname": "Doe"
},
"address": {
"city": "kilcoole",
"street": "7835 new road",
"number": "3",
"geolocation": {
"lat": "-37.3159",
"long": "81.1496"
}
},
"phone": "1-570-236-7033"
}'
from fake-store-api.
Related Issues (20)
- Login no working HOT 1
- API is not working HOT 9
- i cannot get images to show on the products list
- FakeStore API server seems to be down
- server down?
- After adding new user to the endpoint, then 200 code appears but user is not added HOT 1
- POST apis are returning just an object with id prop only HOT 3
- Looks like server is down
- feature delivery part
- server is down HOT 2
- create, update, Delete user api is not working HOT 1
- login issue with new added user HOT 1
- Fetch men's/women's clothing HOT 1
- API doesnโt working HOT 6
- database/ json data HOT 1
- Fakedata
- API is returning 522
- Response in not as attached in the documentation
- WEB SERVER IS DOWN HOT 1
- fakestoreapi.com is down HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fake-store-api.