Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Amit K Gupta
    @amitguptagwl
    Working on Stubmatic 5.0.0
    Amit K Gupta
    @amitguptagwl
    created slack group for stubmatic
    Amit K Gupta
    @amitguptagwl
    now reached to 97% code coverage
    Amit K Gupta
    @amitguptagwl
    Stubmatic 5.0.0 is live now
    Amit K Gupta
    @amitguptagwl
    • Now you can map multiple HTTP methods to a single mapping.
    • You can proxy selective requests to other server or stubmatic instances
    • You can debug HTTP(s) requests from CLI
    • better code coverage, code quality, and performance
    • Now you can embed stub repo with your code and start stubmatic from the code itself
    • Good support for short notations
    • You can validate JSON and YAML(YML) files from CLI. (I'll include XML validator soon)
    • Added the support for "random + first-found" and "round-robin + first-found" strategies.
    Sobinarth Vasanthakumaran
    @sobiv
    Hi @amitguptagwl
    Sobinarth Vasanthakumaran
    @sobiv
    I been using Stubmatic and it is great, I have a question on POST function. Can I post an XML using RE? Thx
    Amit K Gupta
    @amitguptagwl
    Hi! Do you mean POST XML in request? Yes you can. But I didn't get 'using RE' because when you are posting, you are sending data from some 3rd party tool. And I'm not sure how you do that.
    However I'll suggest that if you are facing any issue you can raise it on github with sample data. So I can understand it better
    Sobinarth Vasanthakumaran
    @sobiv
    Thanks for your response
    I am trying to send it as a body XML POST
    I can use post:
    this will take few strings
    Amit K Gupta
    @amitguptagwl
    Whatever you send in POST body, eventually it is text. So you can send anything you want and validate/capture it using RE
    Amit K Gupta
    @amitguptagwl
    @sobiv whether it is xml,json, or any other information, you'll have to put them in body using PUT or POST method. You can try some REST client for better understanding. I believe this question is not related to stubmatic.
    Sobinarth Vasanthakumaran
    @sobiv
    Morning @amitguptagwl
    I have installed Stubmatic on a mac
    Having problem with the second step $stubmatic init [repo-name]
    Amit K Gupta
    @amitguptagwl
    I wish someone can buy a Mac for me to check this issue ;)
    Good Morning @sobiv
    what issue are you facing
    Sobinarth Vasanthakumaran
    @sobiv
    Lol
    I wish I own one as well
    This step works fine
    Installation : $npm install stubmatic -g
    When I do this step
    Set up repo : $stubmatic init stub
    I am seeing -bash: stubmatic: command not found
    Amit K Gupta
    @amitguptagwl
    You probably need to install it with sudo. And I believe this is a general issue of installing any npm package globally. Try others
    Sobinarth Vasanthakumaran
    @sobiv
    Found the problem, this was caused my npm not being installed correctly on Mac
    Thx
    Amit K Gupta
    @amitguptagwl
    np
    Sobinarth Vasanthakumaran
    @sobiv
    If I am adding params such as ?protocol=EZComm what do I need to add to the mapping
    Sobinarth Vasanthakumaran
    @sobiv
    For e.g - request:
    url: /tpmRest/v1/participants/partnerpropertydefinitions\?protocol=([\w]+)
    Amit K Gupta
    @amitguptagwl
    Please check wiki/mappings
    Sobinarth Vasanthakumaran
    @sobiv
    I have checked the mappings but can't see any for Params. There are simple ones
    Can you please advise how I can do this. Thx
    Sobinarth Vasanthakumaran
    @sobiv
    ignore my last comments
    found it via using query:
    Thanks again
    Amit K Gupta
    @amitguptagwl
    np
    Dhiraj Suri
    @Dhiraj_Suri_twitter
    Hello, can anyone help me with extracting the request body from a PUT request with stubmatic. I am trying solve a problem where the response needs to contain certain data from the request itself.
    Amit K Gupta
    @amitguptagwl
    Have you checked the examples here: https://naturalintelligence.github.io/Stubmatic/
    Amit K Gupta
    @amitguptagwl
    You can also ask a question on stackoverflow and share a link here, if you want to share some code snippet.