Uploading app package using Invoke-RestMethod or Invoke-WebRequest
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Uploading app package using Invoke-RestMethod or Invoke-WebRequest
Attempting to upload my app to BitBar using Invoke-RestMethod or Invoke-WebRequest.
Getting " : The remote server returned an error: (500) Internal Server Error."
```
$package = 'c:\my.apk'
$bitbar = 'https://cloud.bitbar.com/api/me/files/'
$user = '<key>'
$pair = "$($user):"
$encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
$basicAuthValue = "Basic $encodedCreds"
$Headers = @{Authorization = $basicAuthValue}
Invoke-RestMethod -Method Post -Uri $bitbar -Headers $Headers -InFile $package -ContentType 'application/octet-stream'
```
I can successfully query using `Invoke-RestMethod -Method Get -Uri $bitbar -Headers $Headers`, so I know that authentication is working with $Headers and that the URL in $bitbar is valid.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Does this issue still persist or was it resolved?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Still exists.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Id recommend to create a support ticket, and our support team will be able to provide more assistance
You can fill out a ticket here:
https://support.smartbear.com/bitbar/message/
