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

POST, PUT as ASCII #7

Open
maleet opened this issue Jan 18, 2017 · 3 comments
Open

POST, PUT as ASCII #7

maleet opened this issue Jan 18, 2017 · 3 comments

Comments

@maleet
Copy link

maleet commented Jan 18, 2017

POST and PUT are used as ASCII. Should be UTF8 also:

image

My special characters from title are lost

@johnbabb
Copy link
Owner

I adjusted the source to be Utf8 let me know if that fixes the issue

@maleet
Copy link
Author

maleet commented Jan 18, 2017

The one from picture works, not Encoding.UTF8.

I use it for this: https://github.com/maleet/jira-toggl-sync

System.Net.WebException was unhandled
  HResult=-2146233079
  Message=The request was aborted: The request was canceled.
  Source=System
  StackTrace:
       at System.Net.ConnectStream.CloseInternal(Boolean internalCall, Boolean aborting)
       at System.Net.ConnectStream.System.Net.ICloseEx.CloseEx(CloseExState closeState)
       at System.Net.ConnectStream.Dispose(Boolean disposing)
       at System.IO.Stream.Close()
       at System.IO.StreamWriter.Dispose(Boolean disposing)
       at System.IO.TextWriter.Dispose()
       at Toggl.Services.ApiService.Get(ApiRequest apiRequest) in E:\GitHub\maleet\jira-toggl-sync\Modules\C--Toggl-Api-Client\Toggl\Services\ApiService.cs:line 172
       at Toggl.Services.ApiService.Put(String url, String data) in E:\GitHub\maleet\jira-toggl-sync\Modules\C--Toggl-Api-Client\Toggl\Services\ApiService.cs:line 117
       at Toggl.Services.TimeEntryService.Edit(TimeEntry obj) in E:\GitHub\maleet\jira-toggl-sync\Modules\C--Toggl-Api-Client\Toggl\Services\TimeEntryService.cs:line 99
       at JiraTogglSync.Services.TogglService.SetWorkLogSynced(WorkLogEntry entry) in E:\GitHub\maleet\jira-toggl-sync\JiraTogglSync.Services\TogglService.cs:line 59
       at JiraTogglSync.Services.WorksheetSyncService.AddWorkLog(WorkLogEntry entry) in E:\GitHub\maleet\jira-toggl-sync\JiraTogglSync.Services\WorksheetSyncService.cs:line 69
       at JiraTogglSync.CommandLine.Program.Main(String[] args) in E:\GitHub\maleet\jira-toggl-sync\JiraTogglSync.CommandLine\Program.cs:line 72
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 
       HResult=-2146232800
       Message=Cannot close stream until all bytes are written.
       Source=System
       StackTrace:
            at System.Net.ConnectStream.CloseInternal(Boolean internalCall, Boolean aborting)
       InnerException: 

@johnbabb
Copy link
Owner

I adjusted the source to use new UTF8Encoding(false)

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