Testing the data from ESP32 to POSTMAN

Hello good people,
i am new. I didn’t find answer for the question in my mind …
I need tool to test HTTP requests from / to ESP32 without create web server on ESP32. for example I can send data by post HTTP request from ESP32 to ThingSpeak. I thought I can do it POSTMAN. I want send some data ( temperature e.g.) from ESP32 to POSTMAN. Then fore , I tried firstly to use GET request side on POSTMAN with https://postman-echo.com/ on web. I did not successful. After that I tried on local as my computer by install POSTMAN.
308 / 5.000

What do you think? Is this possible or am I trying in vain? So do I definitely need to install a server on ESP32? Because the only example I can see is the Server installed version. But frankly it seems unnecessary to me. So, it seems like I should be able to post from ESP32 and receive the data via POSTMAN, just like I can do in Thingspeak.

Already grateful to help…

Hi tunc,

I am not sure what ESP32 is. A quick and basic AI prompt tells me that it is some kind of IO device. So, If this device “can serve” requests using its own API then by all means you can use POSTMAN to make request against this device. Again, I am assuming a lot here. Also note, that the postman echo API is not going to work in your case.

You mention “to/from ESP32” so this implies that this device somehow make an API available. I would suggest to read the documentation from Espressif Systems about any possible APIs.

Good luck in your API jouirney
regards,
Miguel


Hi Miguel,
Yes ESP32 a device it call as SoC chip. I am posting data to postman echo URL only once. I am try to get from POSTMAN interface. However, I don’t know which one wrong between post or get ?I attached 2 image to board. You can see 1.example: posting thingspeak. it is working. 2. example : posting httpbin.org ( it is just example I can see just response 200 not data ) . I read ESP-IDF(esp32 extension for VS code). Actually it is very basic to HTTP request. ı tried post POSTMAN echo. Sending ok . I am taking response 200. However I cant take data…

What do mean by Posting?

Postman is a client, that sends data to API’s which then return a response.

Postman Echo is just an API that will echo back to the client what you send to it.

You can’t send data from an API to Postman Echo and then expect it to appear in the Postman application. In this situation, the API that is sending data to Postman Echo is the client.

I believe that POSTMAN web app can be use to test this situation :
I can send data with ESP32 ( as HTTP client) to POSTMAN server. After that, i can take data from POSTMAN Web or POSTMAN desktop app.
The example idea :

  1. situation : i am use HTTP post my ESP32 circuit (i prepared it my http client) by send data (post) to https://postman-echo.com/get?field1 (in this situation temp is my temperature data read my sensor)
  2. situation : I am adjust GET header on POSTMAN Web or POSTMAN desktop app you can see in image that attached.
    3.situation : i believe i can read temperature data on POSTMAN interface when I click SEND . However i cant see it. Maybe i can do any mistake but I wonder that is it possible because i am new on HTTP protocol and this server client system.
    if you wonder how can send post my ESP32 module , you can see before images that i send .

The Postman Echo API just returns to the sending client what was sent to it.

In your situation, the ESP32 device is the http client, sending data to the Postman Echo API.

The response will be sent back to the device (and only that device).

The Postman application (desktop or web) is not involved at this point. You cannot get access to that response using the Postman application. The API will have an underlying server, but you don’t have access to that or any of the requests\responses that it delivers. The only thing you have access to is the response, and this is only available to the client that sends it (which in your scenario is the ESP32 device, not the Postman application).

The Postman Application and Postman Echo are two completely different services. The Postman application is a HTTP client, used for sending and testing requests and Postman Echo is an API\service that is useful for echoing back what was sent. It’s a type of mock service that allows you to test responses before you have actually coded that element in your own API.

If what you want to do is send a request directly from Postman to the ESP32 device (if it has an HTTP API that be used in this way), then this might return the data you are seeking.

The Postman application in this scenario is the client, and the ESP32 is the server. (The Postman Echo API would not be involved in scenario).

You can’t send data from the server to the Postman client without using something like a webhook (which is another topic in its own right).

Hi Mike,
First of all, thank you for explaining it so well.Can we say that the conclusion that I need to understand from what you said is this :
even if it’s just for testing I can’t use POSTMAN or Echo API like ThingSpeak web App. if I want to read by get with Postman , i need configure my ESP32 as Server. I can’t think Postman Echo service a server can hold that POST data from any HTTP Client ( for this situation ESP32 ) and simultaneously can be read by GET POSTMAN interface . Is it true ? :thinking: can you suggest any tool i can do it that i try to explain.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.