Is there a way to configure a postman request(Http Get, Http Post) to use the system's IP address when calling an API? say If I want to call an api "http://localhost:8080/foo/bar", will I able to configure my computer's IP address for the request?
I have an api which works with IP whitelisting and I am not able to request a resource from the api from postman. And I am getting 403 forbidden as response from the API
CodePudding user response:
The simple answer here is: no.
You can only modify your IP address to a certain extend:
Class A: 10.0.0.0 to 10.255.255.255
Class B: 172.16.0.0 to 172.31.255.255
Class C: 192.168.0.0 to 192.168.255.255
Source: https://www.ibm.com/docs/en/networkmanager/4.2.0?topic=translation-private-address-ranges
If your sever however is listening on localhost and not an external target, I doubt that your IP address is causing the issue here. If so, simply add localhost to the filter or whatever part of your application is denying your request because of your IP address.