Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

post.py 498 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  1. import requests
  2. the_data = {"client_id": "73", "name": "Tenacious Thommie", "company": "Echo Global Logistics"}
  3. URL = f"http://127.0.0.1:8000/add_new_client"
  4. response = requests.post(URL, json=the_data)
  5. print(response.text)
  6. # Or, from a command line, ...
  7. # curl -X 'POST' \
  8. # 'http://127.0.0.1:8000/items/client' \
  9. # -H 'accept: application/json' \
  10. # -H 'Content-Type: application/json' \
  11. # -d '{
  12. # "client_id": "33",
  13. # "name": "Sulky Sarah",
  14. # "company": "Generals Are Us"
  15. # }'
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...