https://linen.dev logo
#wiremock-cloud
Title
# wiremock-cloud
s

Simon Verhoeven

10/12/2023, 5:48 PM
I wanted to enrich my library contribution with proper payloads, but I seem to be missing something. The API was imported fine => I click record => enter the actual API target URL => hit start => perform the apt curl => response of { } I am basing myself upon: https://docs.wiremock.io/recording-stubs/#:~:text=Once%20you%20have%20logged%20into,the%20target%20URL%20and%20hit%20.&text=This%20request%20will%20be%20proxied,json%20and%20the%20result%20captured.
t

Tom

10/12/2023, 6:53 PM
Strange, it worked as expected for me
I wonder if the target API just happened to give a spurious response when you were recording?
s

Simon Verhoeven

10/12/2023, 6:56 PM
Odd, I just tried again with the same results.
t

Tom

10/12/2023, 6:57 PM
Same bad result?
Could you try with
-v
on the curl command and paste the output?
s

Simon Verhoeven

10/12/2023, 6:59 PM
verho@home-pc MINGW64 /c/Development/api-template-library (foojay-discoapi-template) $ curl https://3lg1y.wiremockapi.cloud/disco/v3.0/supported_terms_of_support -v * Trying 44.204.248.166:443... * Connected to 3lg1y.wiremockapi.cloud (44.204.248.166) port 443 (#0) * schannel: disabled automatic use of client certificate * using HTTP/1.x
GET /disco/v3.0/supported_terms_of_support HTTP/1.1
Host: 3lg1y.wiremockapi.cloud
User-Agent: curl/8.1.2
Accept: /
* schannel: remote party requests renegotiation * schannel: renegotiating SSL/TLS connection * schannel: SSL/TLS connection renegotiated * schannel: remote party requests renegotiation * schannel: renegotiating SSL/TLS connection * schannel: SSL/TLS connection renegotiated * schannel: remote party requests renegotiation * schannel: renegotiating SSL/TLS connection * schannel: SSL/TLS connection renegotiated < HTTP/1.1 200 OK < Vary: Origin < Content-Type: application/json < Matched-Stub-Id: dda0378b-5faf-468c-a656-891139bbf52c < Matched-Stub-Name: Returns the supported terms of support < Content-Length: 3 < { }* Connection #0 to host 3lg1y.wiremockapi.cloud left intact
t

Tom

10/12/2023, 7:00 PM
Ah, you have a stub that already matches that request and it’s serving that as a response
If you delete the stub named “Returns the supported terms of support” then try again it should work
s

Simon Verhoeven

10/12/2023, 7:04 PM
Ah ok, thank you. I thought it would update the existing ones if it already matched.
t

Tom

10/12/2023, 7:04 PM
No, it won’t touch existing stubs at the moment.
s

Simon Verhoeven

10/12/2023, 7:19 PM
image.png
t

Tom

10/12/2023, 7:20 PM
What triggered that?
s

Simon Verhoeven

10/12/2023, 7:20 PM
I did a couple of recordings in a row
And some are seemingly missing
there are some pretty large payloads in there
t

Tom

10/12/2023, 7:21 PM
I can’t follow that link unfortunately. Could you send a screenshot of the UI error?
s

Simon Verhoeven

10/12/2023, 7:22 PM
it recovers after a while, just very sluggish
t

Tom

10/12/2023, 7:22 PM
We’re about to start some work to change the way we handle large response bodies
At the moment it’s all in memory, inlined in the stub, and the UI component loads it all
s

Simon Verhoeven

10/12/2023, 7:22 PM
That's what I assumed
t

Tom

10/12/2023, 7:23 PM
We’re going to set a threshold above which it uses file uploads/downloads
s

Simon Verhoeven

10/12/2023, 7:23 PM
I was documenting https://api.foojay.io/swagger-ui#/ to improve my library PR
👍 1
t

Tom

10/12/2023, 7:24 PM
Is there a URL you can share with me that I can use for my own testing?
Would be useful to replicate what you’re seeing so that we can use it to improve things in the interim
s

Simon Verhoeven

10/12/2023, 7:26 PM
t

Tom

10/12/2023, 8:06 PM
Thanks, please leave this with me
Yeah, 25MB payload. Think we’re not quite up to that at the moment.