coduo / TuTu

Flexible HTTP server mocking tool in PHP. TuTu can work with built-in php server so everything that you need to use is php.
MIT License
58 stars 10 forks source link

Matching headers doesn't work #30

Open rafenden opened 7 years ago

rafenden commented 7 years ago

Hi, I have a use case when I try to use TuTu for Soap mocking, SoapClient during the request is adding SOAPAction header which ends with the name of Soap action. Unfortunately matching of headers doesn't work.

responses.yml

say_hello:
  request:
    path: /soap-endpoint
    methods: ['POST']
    headers:
      SOAPAction: endsWith('#GetDetails'))
  response:
    content: |
      Hello {{ request.headers }}!

I'm missing something?

norberttech commented 7 years ago

That does not sounds good, could you please work on a pull request with fix?