Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6780437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:30:21+00:00 2026-05-26T16:30:21+00:00

I am new to Symfony2 and I’m trying to send a new Request() to

  • 0

I am new to Symfony2 and I’m trying to send a

new Request()

to and external API. This is what I have but I don’t know if it is correct use of the built in request/response library.

$request = new Request('https://myservice.com/apimethod?foo=bar', 'GET'); 

Can anyone tell me if this will return a response provided the API I’m trying to call exists?! If not, what am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:30:21+00:00Added an answer on May 26, 2026 at 4:30 pm

    In Symfony2, the Request class represents an HTTP request made to your site. Basically, if you go to www.yoursite.com/someaction Symfony instantiates aSymfony\Component\HttpFoundation\Request object. This object contains methods that you can use to examine the HTTP request (such as seeing if it contains GET or POST variables.)

    This is a good explanation of Symfony and HTTP fundamentals. I also recommend looking at the source code for Request to see exactly what it can do.

    In order to achieve what you’re trying to do in your example, you’d need to use cURL. I personally use a wrapper class on top of cURL that you can find here.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im new in symfony2 framework and i don't know how to store application settings
I am new to Symfony2 but I am wanting to use it as my
So I'm pretty new to Symfony2 and I'm trying to use the camelize filter
I am new to Symfony2 and I have been following the symblog tutorial But
I'm new in symfony2 , I don't know how to write a below query
I'm new in symfony2, I have an instance when I'm trying to installing vendors
I've been using Symfony for a long time but I'm new to Symfony2. After
I have a strange kind of problem. I'm totally new to symfony2 so forgive
I want to use SwiftMailer in Symfony2. To start with, I created a new
In Symfony2 TWIG, when trying to generate a path like this: <a href={{ path('folder_new',

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.