The Slim Framework support forum has moved to http://discourse.slimframework.com. This Tender forum is no longer maintained or monitored.

Subrequest outputs response automatically

Andy's Avatar

Andy

23 Dec, 2015 10:48 AM

Hello, I'm in the process of updating to 3.0 and ran into a problem with sub requests.

The doc says "The result response object is returned."

Instead, the response body is output as well.

Here are my test routes:

$app->group('/v1', function () use($app) {
   $this->post('/test', function(Request $request, Response $response) use($app){
      $subResponse  = $app->subRequest('POST', 'v1/test1', 'x=bsfdasdfa adsf asdfasdf sadfs');
      $subResponse1 = $app->subRequest('POST', 'v1/test1', 'x=d');
      return $subResponse;
   });
$this->post('/test1', function(Request $request, Response $response) use($app){ return $response->withJson(['query' => $request->getQueryParams()]); }); });

I'd expect an output of

{"query":{"x":"d"}}

Instead i see:

{"query":{"x":"d"}}asdfa adsf asdfasdf sadfs"}}

So subResponse is output, then subResponse1 on top of that.

How do I tell Slim, to only return my subRequest responses instead of outputting them and producing invalid json?

  1. 1 Posted by ann on 09 Apr, 2016 06:42 AM

    ann's Avatar

    And I am the one who likes to do this thing.
    https://vidmatedownloadapp.com

  2. 2 Posted by yuvikhan700 on 19 Apr, 2016 11:45 AM

    yuvikhan700's Avatar

    good the set of videos obtainable in the library. Once you’ll choose your selected video, https://mobdrodownload.co.uk searching for online film products best from their products many of these as Google android, nice.

  3. 3 Posted by abhi98 on 06 Jun, 2016 06:05 PM

    abhi98's Avatar
  4. 4 Posted by jamessandoeval on 07 Jul, 2016 10:27 AM

    jamessandoeval's Avatar

    good for laptop or computer, But it can come to be employed http://celebritysnapchatt.com/emily-ratajkowski-snapchat-name/ also to speak with them. After you joining the accurate geat.

  5. 5 Posted by vibrat2ndblod on 07 Nov, 2016 03:10 AM

    vibrat2ndblod's Avatar

    Yes, this will surely help me. Vibrational Manifestation PDF

  6. 6 Posted by manifest2ndblog on 08 Nov, 2016 03:24 AM

    manifest2ndblog's Avatar

    This is really awesome way to share with people. Manifestation Miracle Download

  7. 7 Posted by Stamina Air rov... on 17 Nov, 2016 05:50 PM

    Stamina Air rover's Avatar

    http://fitnessgears.org/
    to take full care of your health.

  8. 8 Posted by duyatuyu on 21 Nov, 2016 05:46 AM

    duyatuyu's Avatar

    Thanks for clearing this problem. I am pleased with it. Teds Woodworking Reviews

  9. 9 Posted by dlvw on 22 Nov, 2016 08:47 AM

    dlvw's Avatar

    Thanks for mentioning this in your post. I was worried about it. Visit To Read More

  10. 10 Posted by upsu on 23 Nov, 2016 06:19 AM

    upsu's Avatar

    I personally love the concept behind this. Keep it up. Visit This Website

  11. 11 Posted by snapchat emojis on 21 Dec, 2016 05:56 PM

    snapchat emojis's Avatar

    thanks for more info http://snapchatemojis.org/

  12. 12 Posted by charolette on 21 Dec, 2016 05:57 PM

    charolette's Avatar

    I love the concept. Keep it up. http://talkmetech.com

  13. 13 Posted by harrmarion1010 on 02 Jan, 2017 11:32 AM

    harrmarion1010's Avatar

    good Some individuals could encounter the problem "could not link to ssl vshare.appvv api mistake" when trying to download vShare that supports setup on http://vsharedownloadpro.com/best-vshare-alternatives-for-ios-iphone-ipad applications there. Most of them are cost-free apps and nice

  14. 14 Posted by tmfv on 16 Jan, 2017 02:38 AM

    tmfv's Avatar

    These output responses are really wonderful. It is great and awesome. How To Get Your Ex Back Guide

  15. 15 Posted by Parker on 14 Feb, 2017 07:46 AM

    Parker's Avatar

    Great In today's round we will certainly see how you could https://iplaystoreapp.com various accounts in one android gadget except you Fine.

  16. 16 Posted by William on 25 Feb, 2017 06:21 AM

    William 's Avatar

    good you with bothersome ads, is very easy to utilize, lets you delight https://iterrariumtv.com Android Application compatible platform with an active connection great.

  17. 17 Posted by stain on 28 May, 2017 10:05 AM

    stain's Avatar

    specific kinds of particular niches. Some individuals have constructed https://theinstagramly.com/instagram-app-download-apk-for-android-pc-ipad-online-login that were anticipating being able to post pictures straight from their PC.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac