Posts

Showing posts with the label resful api automate using python

Automate Rest Api's using Python

Automate Rest Api's using Python  Automation of rest API using python is done by inbuilt library of python , Python package index Request Installation Installing Requests via pip is fairly simple, just run this in your terminal. $ pip install requests For more detailed documentation refer http://docs.python-requests.org/en/master/ Sample Code import requests url = "http:// vulcan-olpstaging.unicommerce.info:8089 /trips/lastmile" headers = {     'content-type': "application/json",     'cache-control': "no-cache",     } payload ={ "pyMessage": { "Tasks": [{ "Task": { "CONSIGNE_STATE": "Delhi", "CONSIGNE_NAME": "sonu sharma", "WIDTH": 10.0, "CREW_CODE": "OLP9876", "TRIP_TYPE": "FWD", "TASK_ACTION": "ADD", "DATE": "2016...