mirror of
https://github.com/ushahidi/SMSSync.git
synced 2026-04-26 00:05:57 +03:00
[PR #126] [MERGED] adds basic auth support and refactored MainHttpClient class. #375
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#375
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?
📋 Pull Request Information
Original PR: https://github.com/ushahidi/SMSSync/pull/126
Author: @mandric
Created: 9/20/2013
Status: ✅ Merged
Merged: 9/24/2013
Merged by: @eyedol
Base:
develop← Head:http-client-refactor📝 Commits (10+)
13543fdadds basic auth support and refactored MainHttpClient class.cf369eaindentation/style tweaks.0654bcdadded getParams, setEntity to MainHttpClient class.d928a5erefactored ProcessMessage and MessageSyncHtptClient classes.d347af2continued MessageSyncHttpClient refactor.a95dee2removedgetFromWebServicemethod from MainHttpClient89605a8added basic auth test, bit more MainHTTPClient refactor.71bfcberemoved stacktrace comment.4b2949aadded example URL in howto on basic auth.69a7c29changed example urls to https.📊 Changes
6 files changed (+456 additions, -214 deletions)
View changed files
📝
genwebsite/howto.mkd(+6 -4)📝
smssync/src/instrumentTest/java/org/addhen/smssync/tests/services/SyncSchemeTest.java(+70 -12)📝
smssync/src/main/java/org/addhen/smssync/messages/ProcessMessage.java(+27 -10)📝
smssync/src/main/java/org/addhen/smssync/net/MainHttpClient.java(+216 -57)📝
smssync/src/main/java/org/addhen/smssync/net/MessageSyncHttpClient.java(+136 -130)📝
smssync/src/main/java/org/addhen/smssync/util/Util.java(+1 -1)📄 Description
fixes ushahidi#17
This handled adding user-agent and basic auth headers to all requests.
Allows easily adding query params or headers via
addParam. andaddHeader.Planning to reuse this class a bit more in some related callback
features. Also was planning to refactor MessageSyncHttpClient and use
the new methods to simplify a bit and show how to use the API.
I replaced the poorly named
getTextfunction with agetResponseandconvertStreamToStringstatic method.Also added
$to URL_PATTERN in case you have that in your basic authpassword.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
FileManageron every write #455