Project
EasyHttp
Priority
Normal
Type
Bug
State
Won't fix
Assignee
Unassigned
Subsystem
No subsystem
Fix versions
No Fix versions
Affected versions
No Affected versions
Fixed in build
Next Build
  • Created by   Jonas Van der Aa
    2 years ago (30 Nov 2011 06:50)
  • Updated by   Hadi Hariri (Admin)
    2 years ago (01 Dec 2011 03:22)
 
EHTTP-36 SerializationException when attempting Post
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
I get a SerializationException when I run the following code:

 HttpClient client = new HttpClient();
 var response = client.Post(new Uri(Settings.BaseUrl, tokenEndpoint).ToString(),
                new DynamicParameterWrapper(queryParameters),HttpContentTypes.TextPlain);


I also tried MultipartFormData as content type.
Disclaimer: I wrote this code as a workaround for issue EHTTP-35.

JsonFx.Serialization.SerializationException was unhandled by user code
Message=The encoding requested does not have a corresponding encoder
Source=EasyHttp
StackTrace:
 at EasyHttp.Codecs.DefaultEncoder.Encode(Object input, String contentType)
 at EasyHttp.Codecs.DefaultEncoder.Encode(Object input, String contentType)
 at EasyHttp.Http.HttpRequest.SetupData()
 at EasyHttp.Http.HttpRequest.SetupBody()
 at EasyHttp.Http.HttpRequest.PrepareRequest()
 at EasyHttp.Http.HttpClient.ProcessRequest()
 at EasyHttp.Http.HttpClient.Post(String uri, Object data, String contentType)
 at VikingAPI.OAuth.Workflow.GetRequestToken(String tokenEndpoint) in C:\tmp\vikingapi\src\VikingAPI\VikingAPI\OAuth\Workflow.cs:line 46
 at VikingAPITests.WorkflowTest.WorkflowGetRequestToken() in C:\tmp\vikingapi\src\VikingAPI\VikingAPITests\WorkflowTest.cs:line 30
InnerException:
Comments (1)
 
History
 
Linked Issues (?)
 
TeamCity Changes (0)
 
Jonas Van der Aa
  Jonas Van der Aa
30 Nov 2011 07:15
2 years ago
epic fail, I should have used ApplicationXWwwFormUrlEncoded content type :) I'm back at the BAD REQUEST's now, but those are my fault also. Sorry for the inconvenience.