How to change Apigee's trace console HTTP method to POST - http-post

How to change ApiGee trace console HTTP method from GET to POST? There is only GET available by default and I cannot change it.
I have not enough rep to embed screenshot so here it is http://i.stack.imgur.com/bffQt.png

The easiest way to do this is by using the API console. Under the Send button on the Trace tool, click the link "Send with the API Console". This will launch the console in a separate tab. The API Console allows you to choose the request verb (GET, POST, PUT, DELETE) as well as header parameters you might want to set. You can start a trace session, send any request using the console, and then go back and see the results of sending the request.

Related

JMeter & socket.io - I can see the message I want, but the socket plugin is not showing what I expect

Here is the socket message I see in the browser debugger console:
More illustrative, perhaps:
I call an API operation that triggers this message over a socket.
What I Tried
To preclude inaccuracies, I started 2 instances of JMeter.
REST API call.
Revised version of the GitHub JMeter example of sockets.io, in which I just call a WebSocket Sampler repeatedly on wss://events.dev.myserver.com:443/socket.io/?EIO=4&transport=websocket.
I kicked off (2).
While that was running, I kicked off (1).
Expected
Eventually, (1) should show me a sampler in the View Results Tree with the message in the screenshot ("42" - GAME_STARTED)
Actual
The only messages I see look like this:
This is really all I want to do: run the appropriate sampler, a sufficient time after making the API call, to get the message.
Update
We succeeded in finding the message using python-socketio:
sio.connect("https://events.dev.server.com", transports='websocket',
headers={'Sec-WebSocket-Extensions: permessage-deflate', 'Sec-Fetch-Dest: websocket',
'Sec-Fetch-Mode: websocket',
'Cookie: ABCSESSIONDEV=NTI3MzkwNWUtMTJmNS00Y2U0LTk1NGUtMjQ2Mzk5OTYxZWE0'})
And here is the output:
Received packet MESSAGE data 2["message","{\"locationId\":110,\"name\":\"GAME_STARTED\",\"payload\":{\"id\":146724,\"boxId\":2002,\"userId\":419,\"createdAt\":\"2022-03-02T14:35:31\",\"lastModifiedAt\":\"2022-03-02T14:35:36.752\",\"completedAt\":\"2022-03-02T14:35:36.621\",\"activationMethod\":\"TAG\",\"nfcTagId\":\"xxxxxx\",\"gameCount\":1,\"app\":false}}"]
I would like to use the websocket plugin to do this in JMeter now.
tried adding Cookie to WebSocket call - only sids, no messages.
tried adding Cookie to an HTTPS request (like the above code) - 400, bad request.
Take a look at other fields of the HTTP Request, in particular HTTP Headers, most probably your JMeter request is missing some essential information.
My expectation is that in order to "start the game" (whatever it means) you need to open the page in the browser, authorize somehow, follow the steps of the protocol upgrade mechanism, etc. to wit exactly mimic what real browser does, all the request sequence which is prior to starting the game.
You might need to correlate dynamic parameters, add HTTP Header Manager, add HTTP Cookie Manager, etc.

How can I get Http Request and Response data from QtWebEngine?

I'm working on a simple web browser project that uses QtWebEngine.
What I want to is to log out the httpRequest and httpResponse data that transit in my browser. I only interest in http POST transitions.
In chrome's developer's tool, I can do this by go to Network tab, turn on Preserve log. What I need is
Headers>General>Request URL
>From Data (params of POST)
Response (the raw response data)
Since QtWebEngine uses Chromium, I suppose that most things that chrome can do can also be done in QtWebEngine.
How can I get the above three things using QtWebEngine?
If there is no obvious way to do that, can I write an extension to log them out and make QtWebEngine use this extension? I think in extension I can log out http request header but I have no idea of how to log out the response data.
Edit: I don't want to an external debug tool (like port the log to localhost:myport). I need to use those three pieces of data in my browser application.
Edit2:
chrome.devtools.network.onRequestFinished.addListener
Yes somehow I need this but how can I call this or receive a similar event with Qt5.7?

how to use fiddler to make Post request

I have capured the Post request from Fiddler , now i wanted to re execute this Post reqest from Fiddler itself.
Please suggest me steps to re execute the Post request from fiddler
I am using Fiddler4
Thanks
You can reissue requests in Fiddler in many ways. For instance, you can simply right-click any Session in the Web Sessions list and choose Replay from the context menu. Alternatively, you can drag and drop a Session to the Composer tab and edit it before resending.

django-rest-framework: how to allow http PUT to succeed

I have a startup django-rest-framework app, which I'm using to serve data to another Django app
I have no issues with GET, POST, and DELETE, but when I issue a PUT - I get 405
What can I do to fix that?
if I'm remembering well, I has the same issue. Following the tutorial of django-rest-framework I noticed that pressing PUT botton request and monitoring network tab of chrome developer tools it did a POST request instead of PUT request.
Maybe '405 METHOD NOT ALLOWED' error message caused by request without '/' at the end of the url.
Not working 127.0.0.1:8000/article/9
Working 127.0.0.1:8000/article/9/
If not, check how you request it. It's similar to request DELETE method.
This is an example I've just testing using PAW http client application
PUT Method request screenshot
PUT Method request result screenshot

How to find whether Ajax request successfully send by Fire-bug add-on?

Please can some one explain me how to use Fire-bug add-on to check about whether Ajax request successfully send from our application ???
When you turn on Firebug, there's tab called 'Network' - there are shown all requests, especially ajax. The network tab allows you to filter requests and check request/response headers, status code, and message.
So, if you turn on Firebug and open Network tab (it's possible you'll have to enable tracking first, in that case it will show appropriate message), you will see if there was a request, where you expected it should be.
To see only ajax requests, check XHR on top bar, just under general tabs.
It will display in 'console' tab in firebug. i show you ajax call and request. it show ajax request like if ajax is successful then is gives 200 request and display the data or if the ajax request if fails is gives you a 301 request or some other request.

Resources