Skip to content

Instantly share code, notes, and snippets.


secondsun/ Secret

Last active Aug 29, 2015
What would you like to do?

Installation Notes

Google Setup

UPS Setup

curl -3 -v -b cookies.txt -c cookies.txt  -H "Accept: application/json" -H "Content-type: application/json"  -X POST -d '{"loginName": "admin", "password":"My_password"}'  https://localhost:8080/ag-push/rest/auth/login
  • Produces Error :
Invoke-WebRequest : Parameter cannot be processed because the parameter name 'c' is ambiguous. Possible matches
include: -Credential -CertificateThumbprint -Certificate -ContentType.
At line:1 char:27
+ curl -3 -v -b cookies.txt -c cookies.txt  -H "Accept: application/json" -H "Cont ...
+                           ~~
    + CategoryInfo          : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
    + FullyQualifiedErrorId : AmbiguousParameter,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
  • Default cUrl commands aren't portable to PS 4.x in Windows 8
  • Making call with Invoke-WebRequest instead using correct params
Invoke-WebRequest https://localhost:8443/ag-push/rest/auth/login -Body '{"loginName": "admin", "password":"My_password"}'  -Headers @{'Content-type'='application/json';'Accept'='application/json'} -Method Post -SessionVariable session
  • Produces Error :
Invoke-WebRequest : JBWEB000065: HTTP Status 401 -
JBWEB000309: type JBWEB000067: Status report
JBWEB000068: message
JBWEB000069: description JBWEB000121: This request requires HTTP authentication.
JBoss Web/7.2.2.Final-redhat-1
At line:1 char:1
+ Invoke-WebRequest https://localhost:8443/ag-push/rest/auth/login -Body '{"loginN ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Creating Android App

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment