lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

Question: How to construct and test POST url in lighthouse

Open chinni20 opened this issue 7 years ago • 7 comments

https://stackoverflow.com/questions/54660858/construct-post-url-for-the-lighthouse-tool

I really appreciate your help!

chinni20 avatar Feb 13 '19 06:02 chinni20

StackOverflow is already the appropriate place to ask for help like this 👍

patrickhulce avatar Feb 13 '19 15:02 patrickhulce

Patrick,But I coudnot get any solution and tried so much in the lighthouse documentation is there any way to do testing for post url’’s.

I really appreciate and would be nice ,if you add some example along with the command to the documentation.I am doing POC for the lighthouse ,if it works for the POST url’s too .We want to use tool for the browser performance testing. I am really stuck.

I hope you understand !

chinni20 avatar Feb 13 '19 15:02 chinni20

Oh, I see. There is not a way to configure Lighthouse to work with POST data at the moment. #3837 and #1418 might have a bit of discussion that is helpful, but they will all be quite different workarounds.

patrickhulce avatar Feb 13 '19 17:02 patrickhulce

patrick, Do you have any plans to implement this?

chinni20 avatar Feb 13 '19 18:02 chinni20

No.

patrickhulce avatar Feb 13 '19 19:02 patrickhulce

For now, We'd recommend you workaround this on your side.. something like a new secret URL where a GET delivers the same page of content as your POST would.

paulirish avatar Feb 13 '19 21:02 paulirish

@Paulirish,I didnot get you. I am trying to do test GET and POST urls using light house along with bat fille by providing the txt file path which has list of url’s.

Below is the post url generated from swagger, when i submitted the data projectid,batchname,week ending date.I have confirmed with the developer, i need to use the below URL as a POST request url generated from swagger.

http://xxxxxxxxxxx/timecard/v1/batches/projectId/59081 Curl

curl -X POST "http://ixxxxxx/timecard/v1/batches/projectId/59081" -H "accept: application/json" -H "Content-Type: application/json" -d "{ "batchName": "Perf_POC", "batchStatus": "UNSUBMITTED", "weekEnding": "2019-02-15"}

chinni20 avatar Feb 14 '19 00:02 chinni20