Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image endpoint #101

Closed
kylef opened this issue Jun 19, 2013 · 4 comments
Closed

Image endpoint #101

kylef opened this issue Jun 19, 2013 · 4 comments

Comments

@kylef
Copy link

kylef commented Jun 19, 2013

As discussed in AFNetworking/AFNetworking#1075 this is an issue for adding an image endpoint.

I'll convert this to a pull request tomorrow. But just so we can figure out how to do this I have created an issue right now.

Would be great to have an endpoint which would support multiple types like as follows:

> GET /image HTTP/1.0
> Accept: image/png
< Content-type: image/png
> GET /image HTTP/1.0
> Accept: image/jpeg
< Content-type: image/jpeg
> GET /image HTTP/1.0
> Accept: image/*
< Content-type: image/png

There are two options we have:

  • Generate images in code so we don't have any static files. I like this idea, but it might not be a good choice for performance. It may also add a dependency for something like PIL.
  • Include a bunch of static images in the project

/cc @mattt

@kennethreitz
Copy link
Contributor

Love the API. Exactly what I had in mind w/ the accept headers.

@kennethreitz
Copy link
Contributor

I think just having a few static images in the repo is totally fine. Is there a reason that you'd want them to change often?

@kylef
Copy link
Author

kylef commented Jun 19, 2013

Nope, it was purely because I hate putting binary data in repositories. Great, will get going tomorrow (UK time).

@kennethreitz
Copy link
Contributor

As long as it's small, it's fine with me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants