lwip - How to create http post request - http-post

Is there a way to create HTTP POST requests with existing lwip functionality?
I can find their http client but for some reason it only supports HTTP GET.
https://github.com/particle-iot/lwip/blob/master/src/apps/http/http_client.c

Related

Possible if want to do API Load Testing using JMeter with URI info only?

My team planned to do API Performance Testing using JMeter 5.0 for my client. My client developed the API in Kubernetes. Just wondering, they gave info such as URI, HTTP Method and Content-Type only. We never have experience using URI. Are these info sufficient to do load test in JMeter? And where do I fill in these info? Is it in Config Element: HTTP Header Manager?
Because usually I only do my enablement using sample website which already provide the URL.
Do I need to ask them to provide the specific URL for this? Or URL can be extracted from URI?
Thanks.
Normally you should put:
Protocol, server name or IP and Port Number into HTTP Request Defaults, this way you will have a single configuration element having these details and in case of change you will need to introduce the change at one place only and won't have to revisit each and every HTTP Request sampler
Individual requests are defined using individual HTTP Request samplers where you need to provide URL Path and request body (if any)
Content-Type and other Headers can be provided via HTTP Header Manager, the same Scoping Rules as for HTTP Request Defaults apply, for example if you want to send application/json for all the requests just add HTTP Header Manager on the top of your Test Plan and it will add the header to all HTTP Request samplers which are at the same level as the HTTP Header Manager or lower.

Is there a way to send body in Http Get Method in browser?

I am currently facing a requirement that could support HTTP Get Request with payload. Also this question has confused me for a long time. Is there a way to send body with a HTTP GET request from browser side? I know you could send get request with body by using Python, Php,cUrl etcs, but how about from browser side?
I have done some investigations on this topic and find out that most of the popular http request libaries such as axios,request,superagent do not support this feature. Even, the fetch and XMLHTTPrequest does not support Get method with payload.(https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/send)
The weird thing is that the standard(or RFCs) did not forbid sending a get request with body.
Here comes my question, is there any way from web browser we could support http get request with body?

Connect HTTP Proxy with Authorization with Fiddler

I would like to connect to a HTTP Proxy with Fiddler Core.
I'm using the oSession['X-OverrideGateway'] = "HOSTNAME:PORT" code to do it.
Now authentication is needed for the proxy. I see in other question a solution. It says:
oSession.oRequest["Proxy-Authorization"] = "Basic sOMeBASE64eNCODEdSTRING=";
Where the hash at the end is the Base64 coding of the 'username:password'
My question about this workaround:
It results a HTTP_PROXY_AUTHORIZATION HTTP header to my requests. Not just from fiddler to the proxy, but also from the proxy to the web.
Shouldn't it be removed by the proxy?
Is there a workaround with Fiddler so I can connect a HTTP Proxy with credentials without HTTP headers?
I would like to use Fiddler Core.
UPDATE:
As I can see the image
I only have to provide the Proxy-Authorization header if a Proxy Authentication header was in a response with a status code. It seams ok. But in fiddler core how can I reach the previous response? If I just simply save into a field variable it won't work, since the order of the traffic is not
Request, Response, Request, Response, etc.
But mor like
Request, Response (407), Request, Request, etc.
In the 2nd example on the 3rd Request we shouldn't send the Proxy Authorization header but we will, since the last Response was a 407.
Any ideas?
HTTP_PROXY_AUTHORIZATION header is required for proxy to work.
Please refer to the HTTP RFC section 4.4 https://www.rfc-editor.org/rfc/rfc7235#section-4.4
As it mentions, if there are multiple proxies in a chain, your proxy server may forward the headers ahead.
The difference you see with Fiddler Core and Proxifier could be due difference in their configuration.

things behind http to https request

We implementing API and expecting to make it work only with HTTPS protocol. Let's assume it will be https://api.my_famous_app.com Could you explain me how things work in reallife, if it will be an appication http://my_app.com who worked via HTTP and sending to my api:
serverside requests
clientside requests (ajax)

How to make Symfony2 return HTTP Response with Connection: Keep-Alive?

I'm using Symfony2 to create a REST API server for my application in the backend, and was thinking of reusing the same HTTP connection for subsequent queries using Http Keep-Alive, but after every query, I see a Connection: close in the response header.
Is there a way to tell Symfony2 to don't close the connection after each response and wait for more Request headers?
In your case it seems that the best solution is to write kernel.response event listener. And modify your request like $response->headers->set('Connection', 'Keep-alive')

Resources