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 6981551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:10:19+00:00 2026-05-27T18:10:19+00:00

I am working on building a PHP/Zend REST webservice and one of its methods

  • 0

I am working on building a PHP/Zend REST webservice and one of its “methods” is to retrieve a user profile (I would go let’s say site.com/user/profile). All the user data is pretty much encoded as string (name, description, dob, …) but I dont know how should I retrieve their image. What would be the best way to bring the user image and still be RESTfully complied? Should I have a specific method for the image or is there a way I could bring it all the data at once?

The pictures could be either saved in the file system or in the database, this should not matter on the implementation.

  • 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-27T18:10:19+00:00Added an answer on May 27, 2026 at 6:10 pm

    couple of options:
    – Use accept type header on the request to the same Uri. (site.com/user/profile), so a get with accept type json will bring their data, with jpg it would return the image.
    – add additional resource identifier for the image, such as /user/profile/picture. The Uri for this resource should be supplied in the response for /user/profile

    depends how you think of the picture, is it a different representation of the same resource, or a new resource.

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

Sidebar

Related Questions

I'm building an API in PHP. One of the methods is place.new (PUT request).
I am working on building an REST API in PHP, I need to know
I am presently working on building an user referral tracking script in PHP ,
I'm working on building a database to manage project assignments, and the one part
I'm working on building the URLs for my REST API before I begin writing
I'm working on building a PHP based proxy script to access a particular ASP.NET
I'm working on a php project.. And I started building the admin login system
I am currently working on a building community website in PHP. This contains forms
I am new to Multi-Dimensional arrays and working on building my php skills as
I am working on building a search-engine friendly CMS. I know that perhaps one

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.