mirror of
https://github.com/ushahidi/SMSSync.git
synced 2026-04-25 15:55:57 +03:00
[GH-ISSUE #7] support callbacks in responses #4
Labels
No labels
Bug report
Code improvement
Concern
Feature request
Feature request
Good first issue to work on
In progress
Needs info
Question
Ready
Translation
User Experience
User Experience
Website
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SMSSync#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mandric on GitHub (Jan 20, 2012).
Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/7
Hello, I am interested in supporting a callback setting in the json response body for the gateway to make an additional HTTP request after it processes the payload. I'd like to allow the server to specify a callback attribute like below. I'm hoping to be able to chain some requests together:
Before I embark on supporting this type of functionality I thought I would consult. Let me know if this is something you might find useful or how you might architect something like this, or if it fits.
Also it seems there is some confusion in the current callback term used within the application and docs that refer to a callback URL but it really seems more like a polling URL, or task polling. I would like to support both polling and callbacks, by callback I mean one http call that prompts another by providing a configuration similar to above in the response.
@eyedol commented on GitHub (Jan 22, 2012):
You mind sharing a use case for this feature?
@mandric commented on GitHub (Jan 23, 2012):
I will get back to you soon.
@eyedol commented on GitHub (Jan 23, 2012):
Thank you mandric -- looking forward.
@mandric commented on GitHub (Feb 9, 2012):
Hey again, the use case is referrals. Basically want the data in one sms message to get parsed and forwarded to another destination depending on the data inside of it. The use case is likely very specific to our needs/constraints. We are deploying on CouchDB and so there are limitations to what we can do server side with one request. We can create a record with an HTTP POST, but we can't do a join, we need to make another http request to look up a related record. So we need to send the gateway (or another process) some data about what is the next step to eventually complete a process, so we need to chain requests. There are two pieces to our stack: CouchDB and the SMS Gateway (SMSSync). So we are pushing extra process requests onto the gateway.
I'm planning to start a branch for this in my repo and see how it goes. If it's something you think is useful to the SMSSync users at large then let me know.
@mandric commented on GitHub (Feb 9, 2012):
Oops closed by mistake.
@eyedol commented on GitHub (Feb 11, 2012):
Yes, I think this well be really useful for most users. Could you send me a pull request when you're done with the implementation?
@mandric commented on GitHub (Feb 13, 2012):
@eyedol I have it in a branch resp-callback2 in my repo. let me know what you think, it's somewhat quick and dirty, I wasn't expecting you to want to merge it, so let me know if you like the idea and how to clean it up. I also added callback processing to the task polling requests, but still testing it a bit.
Thanks!
@mandric commented on GitHub (Feb 19, 2012):
@eyedol I branched from the 1.1.9 tag because there appeared to be a bug in master that wouldn't let me get off the settings screen. Also now I'm maintaining a 1.1.9-kujua branch because we need to do a release soon with the callback support. Let me know what you think, your comments would be greatly appreciated and thanks again for providing SMSSync. https://github.com/mandric/SMSSync/pull/1/files
@ghost commented on GitHub (Apr 17, 2012):
I would use something like this to have the phone report back to the server whether the message was sent successfully or not.
(If sending at message fails at first, will SMSSync retry later?)
@ghost commented on GitHub (May 28, 2012):
I would have needed it last weekend.
@mandric : Do you have installable apks?
@mandric commented on GitHub (May 28, 2012):
@agenttihirvinen I do see: https://medic.s3.amazonaws.com/downloads/gateway/SMSSync-kujua2-debug.apk and I maintain a fork if you have issues over here: https://github.com/mandric/SMSSync/ currently the callback features are undocumented though. But basically you send a resp body with a json object that has
optionsanddataproperties to configure the next http request, similar to the nodejs request module.@ghost commented on GitHub (May 31, 2012):
@mandric : Thanks, I'll try to find time to look into it. The apk fails to install btw on a Samsung Xcover at least.
@mandric commented on GitHub (May 31, 2012):
@agenttihirvinen what version of Android? Also I assume you enabled non-market apps? ps. i don't want to create too much noise here if it's not related to resolving the ticket.
@ghost commented on GitHub (Aug 21, 2012):
@mandric: I think it might have been an issue of not removing the old installation first, i.e. something to do with version numbers? Not really familiar with android development yet. =( Anyway, I'm now running a self-built instance of yesterday's state of development branch for multiple sync url support so I don't have to constantly break service or buy a new phone to use with my dev environment.
Any progress towards getting this merged?
@eyedol commented on GitHub (Nov 6, 2012):
@mandric Did you get to implement this? I would like to look into this in the next release
@mandric commented on GitHub (Nov 7, 2012):
Working on a port to 2.0 branch...
@mandric commented on GitHub (Nov 15, 2012):
Tossed up a doc for this, there's a download link in there if you want to try it. Feedback appreciated... I only implemented what I needed but it might be good enough for generic use. https://github.com/mandric/SMSSync/wiki/HTTP-Callbacks
@eyedol commented on GitHub (Nov 15, 2012):
@mandric I'll play with this tomorrow. Keep you posted
@eyedol commented on GitHub (May 23, 2014):
@mandric is this still valid. Confirm so I can close it.
@mandric commented on GitHub (May 23, 2014):
No it's not valid anymore. We are going with the more straightforward documented web API for results instead, see #11.