PostCatcher Equivalent For Https? - https

I have been using postcatcher.in to test my HTTP post requests. But, I have no been able to find an equivalent service which supports HTTPS. Does anyone knows of something like that?

Beeceptor - can help you. It is real-time and supports HTTPs.
Request payload inspection
Mocking the response when a request path matches
(Disclaimer: I am the author and developed this as a need to proxy requests to an HTTP endpoint and still want to mock a few requests)

Related

Does HTTP stub server stubby4j support request proxying with additional query params setting?

TL;DR:
Does stubby4j request proxying functionality support the setting of additional query params with the request which is being proxied?
Details:
I am using stubby4j HTTP stub server, the latest version (i.e.: v7.3.3) to proxy requests to another real live service when my request did not match any of the configured stubs.
I am interested to know if it is possible to pass in additional query params to the live service with the request which is being proxied?
In the official docs of the stubby4j request proxying behavior (https://stubby4j.com/docs/request_proxying.html) there is nothing mentioned about it and from what I see in my own testing, I do not think this is supported. But, I still wanted to ask on SO to check if I am simply doing something wrong.
You are correct, the the setting of additional query params on the request being proxied is not supported currently.
As per the aforementioned docs, the additive strategy only supports the setting of additional HTTP headers, which are specified in the headers property on the proxy-config object in your YAML.
But, it is pretty straightforward to add the addition of query params behavior. Feel free to raise a feature request at https://github.com/azagniotov/stubby4j/issues/new/choose

AWS API gateway really works well but I can't run this on javascript AJAX

I made python function using AWS lambda and connected lambda with API Gateway
After then, I tested API. It worked well.
Testing in API Gateway was Successful
Now I tried to using this API with AJAX.
Javascript AJAX Code was like this
How ever result was
"jquery-3.4.1.js:9837 GET https://9i1jhuewmj.execute-api.ap-northeast-2.amazonaws.com/test/transaction?jpgname=image.jpg net::ERR_FAILED"
How can i solve this problem??
Hope for your wisdom!
Thank you
I think there are a few things. The content-type header being returned is application/json but the response is not JSON.
But I think the main problem is that the HTTP status being returned is 301. This tells the browser that this resource has been moved and the browser typically expects the response to contain information on where things are moved to so it can redirect.
I suspect if you change your configuration so that a more normal response code (i.e. 200) is returned, this will work better.

JMeter Load testing of API in WSO2 API Gateway

In my current project we want to implement high performance test procedures and monitoring in WSO2 and in the API gateway area. Unfortunately there is little or no documentation to help me. Has any of you ever built such a scenario?
I am very grateful for any help!
Load testing of WSO2-hosted webservices isn't different from any other web services, to wit you should be able to use:
Normal JMeter's HTTP Request sampler to execut GET, POST, PUT, DELETE, etc. requests against the API endpoints
HTTP Header Manager to send headers like Content-Type and Authorization
JSON Extractor for extracting dynamic data for correlation purposes
More information:
Load Testing Published APIs with JMeter
API Testing With JMeter and the JSON Extractor
You can refer https://github.com/wso2/performance-apim. In this, it has done some load testing for the API gateway. There it uses slow backends, API mediations, etc. Maybe you can reuse some of the JMeter scripts.

Inspect REST request and response generated by jersey and jaxb

I have a method:
#PUT
#Consumes(MediaType.APPLICATION_XML)
#Produces(MediaType.TEXT_PLAIN)
public String createQueue(JAXBElement<Queue> queueElement) {
// do some stuff here
return "";
}
Now, when I call this service from my client java application, I would like to inspect the HTTP request that has been created. I want to see the XML (request body) that is created by jaxb. Is there a tool that can observe requests / responses that are made on a particular URL?
Thanks in advance, Andreas
You can use a simple program that will act as a proxy and display the HTTP requests. There are plenty out there. Since you are using Java I suggest a simple TcpMon. If you use soap a lot also, you can use the built in monitor in soapui. If you also want to watch traffic from your browsers, you might consider fiddler.
For that I would use Firefox + Firebug, which has nice network panel.
Charles has a much better UI than Fiddler
Charles and Fiddler are proxy debuggers.
If you just want to sniff the http traffic I recommend Wireshark since it sniff the traffic at the Ethernet level and there is no proxy settings to change

How to create a WCF reply service for AJAX unit testing

I want to create a WCF service that will simply reply back the query string, HTTP headers, and the HTTP verb used in a request it received.
I want to use it to unittest a AJAX enabled JavaScript framework I am building so I can verify that the HTTP headers and HTTP verbs are being set correctly.
Basically I need a way to make the WCF service bind to HTTP GET, POST, PUT, and DELETE, and I need a way to grab all the headers etc. and return them.
Any input is much appreciated, Egil.
Not sure that it is possible to do exactly what you want to do. But you could come close using REST with WCF, see http://msdn.microsoft.com/en-us/netframework/cc950529.aspx
It turns out a HTTP handler was an easier way to go than a WCF service. I posted my solution over at my blog: Simple Ping/Reply Service for Unit Testing AJAX/XHR requests. I hope this helps others as well.

Resources