Click here to Skip to main content
15,907,326 members
Home / Discussions / C#
   

C#

 
QuestionMake a single exe application - costura.fody - AppDomain.CurrentDomain.AssemblyResolve Pin
andla119-Apr-20 8:19
andla119-Apr-20 8:19 
AnswerRe: Make a single exe application - costura.fody - AppDomain.CurrentDomain.AssemblyResolve Pin
Richard MacCutchan19-Apr-20 21:54
mveRichard MacCutchan19-Apr-20 21:54 
GeneralRe: Make a single exe application - costura.fody - AppDomain.CurrentDomain.AssemblyResolve Pin
andla120-Apr-20 6:23
andla120-Apr-20 6:23 
GeneralRe: Make a single exe application - costura.fody - AppDomain.CurrentDomain.AssemblyResolve Pin
Dave Kreskowiak20-Apr-20 8:35
mveDave Kreskowiak20-Apr-20 8:35 
GeneralRe: Make a single exe application - costura.fody - AppDomain.CurrentDomain.AssemblyResolve Pin
andla121-Apr-20 3:33
andla121-Apr-20 3:33 
GeneralRe: Make a single exe application - costura.fody - AppDomain.CurrentDomain.AssemblyResolve Pin
andla121-Apr-20 3:46
andla121-Apr-20 3:46 
GeneralRe: Make a single exe application - costura.fody - AppDomain.CurrentDomain.AssemblyResolve Pin
Dave Kreskowiak21-Apr-20 4:03
mveDave Kreskowiak21-Apr-20 4:03 
QuestionRestSharp poser Pin
pkfox18-Apr-20 8:57
professionalpkfox18-Apr-20 8:57 
I now have a net core api service up and running on a Linux box using Nginx as a reverse proxy server, I can call all of the controller methods that don't have parameters and they return collections of my custom classes. But I'm stuck on one get method that requires a custom class as an input parameter, the controller method code is below

[HttpGet]
[ActionName("GetBOM")]
public ActionResult<bomparam> GetBOM([FromBody] BOMParam bp)
{
// This calls my DAL which queries a database and returns the bp populated with various values
return businessLayer.APIGetBOM(bp);
}

What I can't figure out is how to pass a class instance as a parameter to the method using RestSharp

This is what I've tried
Hide Copy Code

RestClient client = new RestClient("http://IPOfRestService:Port/GetBOM");
RestRequest request = new RestRequest(Method.GET);
BOMParam bp = new BOMParam();
bp.ValveCode = "80044-08";
bp.Torque = 20;
bp.DirectFit = false;
bp.BarPressure = 6;
request.AddJsonBody(bp);
IRestResponse response = client.Execute(request);

I get a not found back in the response object.
Can't find anything googling so thought I'd try here
"We can't stop here - this is bat country" - Hunter S Thompson - RIP

AnswerRe: RestSharp poser Pin
Gerry Schmitz18-Apr-20 11:04
mveGerry Schmitz18-Apr-20 11:04 
GeneralRe: RestSharp poser Pin
pkfox18-Apr-20 22:00
professionalpkfox18-Apr-20 22:00 
QuestionStatus Of Printing Files Pin
Member 1480498517-Apr-20 2:59
Member 1480498517-Apr-20 2:59 
AnswerRe: Status Of Printing Files Pin
Richard Deeming17-Apr-20 3:51
mveRichard Deeming17-Apr-20 3:51 
QuestionJoin 3 tables error : Incorrect syntax near '.'. Pin
Member 1266420916-Apr-20 3:59
Member 1266420916-Apr-20 3:59 
AnswerRe: Join 3 tables error : Incorrect syntax near '.'. Pin
Richard Deeming16-Apr-20 4:01
mveRichard Deeming16-Apr-20 4:01 
GeneralRe: Join 3 tables error : Incorrect syntax near '.'. Pin
Member 1266420916-Apr-20 4:10
Member 1266420916-Apr-20 4:10 
GeneralRe: Join 3 tables error : Incorrect syntax near '.'. Pin
Richard Deeming16-Apr-20 4:23
mveRichard Deeming16-Apr-20 4:23 
GeneralRe: Join 3 tables error : Incorrect syntax near '.'. Pin
Member 1266420916-Apr-20 5:07
Member 1266420916-Apr-20 5:07 
GeneralRe: Join 3 tables error : Incorrect syntax near '.'. Pin
Richard Deeming16-Apr-20 5:10
mveRichard Deeming16-Apr-20 5:10 
GeneralRe: Join 3 tables error : Incorrect syntax near '.'. Pin
OriginalGriff16-Apr-20 5:37
mveOriginalGriff16-Apr-20 5:37 
Questionfilling a column with property value of object Pin
Aresto196414-Apr-20 20:39
Aresto196414-Apr-20 20:39 
AnswerRe: filling a column with property value of object Pin
joost.versteegen14-Apr-20 20:52
joost.versteegen14-Apr-20 20:52 
GeneralRe: filling a column with property value of object Pin
Aresto196415-Apr-20 3:33
Aresto196415-Apr-20 3:33 
AnswerRe: filling a column with property value of object Pin
OriginalGriff14-Apr-20 21:34
mveOriginalGriff14-Apr-20 21:34 
QuestionTarga files displayed in openFileDialog Pin
MikeBr13-Apr-20 22:26
MikeBr13-Apr-20 22:26 
AnswerRe: Targa files displayed in openFileDialog Pin
OriginalGriff13-Apr-20 23:19
mveOriginalGriff13-Apr-20 23:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.