Click here to Skip to main content
15,798,826 members
Home / Discussions / C#
   

C#

 
QuestionMake a single exe application - costura.fody - AppDomain.CurrentDomain.AssemblyResolve Pin
andla119-Apr-20 9:19
andla119-Apr-20 9:19 
AnswerRe: Make a single exe application - costura.fody - AppDomain.CurrentDomain.AssemblyResolve Pin
Richard MacCutchan19-Apr-20 22:54
mveRichard MacCutchan19-Apr-20 22:54 
GeneralRe: Make a single exe application - costura.fody - AppDomain.CurrentDomain.AssemblyResolve Pin
andla120-Apr-20 7:23
andla120-Apr-20 7:23 
GeneralRe: Make a single exe application - costura.fody - AppDomain.CurrentDomain.AssemblyResolve Pin
Dave Kreskowiak20-Apr-20 9:35
mveDave Kreskowiak20-Apr-20 9:35 
GeneralRe: Make a single exe application - costura.fody - AppDomain.CurrentDomain.AssemblyResolve Pin
andla121-Apr-20 4:33
andla121-Apr-20 4:33 
GeneralRe: Make a single exe application - costura.fody - AppDomain.CurrentDomain.AssemblyResolve Pin
andla121-Apr-20 4:46
andla121-Apr-20 4:46 
GeneralRe: Make a single exe application - costura.fody - AppDomain.CurrentDomain.AssemblyResolve Pin
Dave Kreskowiak21-Apr-20 5:03
mveDave Kreskowiak21-Apr-20 5:03 
QuestionRestSharp poser Pin
pkfox18-Apr-20 9:57
professionalpkfox18-Apr-20 9: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 12:04
mveGerry Schmitz18-Apr-20 12:04 
GeneralRe: RestSharp poser Pin
pkfox18-Apr-20 23:00
professionalpkfox18-Apr-20 23:00 
QuestionStatus Of Printing Files Pin
Member 1480498517-Apr-20 3:59
Member 1480498517-Apr-20 3:59 
AnswerRe: Status Of Printing Files Pin
Richard Deeming17-Apr-20 4:51
mveRichard Deeming17-Apr-20 4:51 
QuestionJoin 3 tables error : Incorrect syntax near '.'. Pin
Member 1266420916-Apr-20 4:59
Member 1266420916-Apr-20 4:59 
AnswerRe: Join 3 tables error : Incorrect syntax near '.'. Pin
Richard Deeming16-Apr-20 5:01
mveRichard Deeming16-Apr-20 5:01 
GeneralRe: Join 3 tables error : Incorrect syntax near '.'. Pin
Member 1266420916-Apr-20 5:10
Member 1266420916-Apr-20 5:10 
GeneralRe: Join 3 tables error : Incorrect syntax near '.'. Pin
Richard Deeming16-Apr-20 5:23
mveRichard Deeming16-Apr-20 5:23 
GeneralRe: Join 3 tables error : Incorrect syntax near '.'. Pin
Member 1266420916-Apr-20 6:07
Member 1266420916-Apr-20 6:07 
GeneralRe: Join 3 tables error : Incorrect syntax near '.'. Pin
Richard Deeming16-Apr-20 6:10
mveRichard Deeming16-Apr-20 6:10 
GeneralRe: Join 3 tables error : Incorrect syntax near '.'. Pin
OriginalGriff16-Apr-20 6:37
mvaOriginalGriff16-Apr-20 6:37 
Questionfilling a column with property value of object Pin
Aresto196414-Apr-20 21:39
Aresto196414-Apr-20 21:39 
AnswerRe: filling a column with property value of object Pin
joost.versteegen14-Apr-20 21:52
joost.versteegen14-Apr-20 21:52 
GeneralRe: filling a column with property value of object Pin
Aresto196415-Apr-20 4:33
Aresto196415-Apr-20 4:33 
AnswerRe: filling a column with property value of object Pin
OriginalGriff14-Apr-20 22:34
mvaOriginalGriff14-Apr-20 22:34 
QuestionTarga files displayed in openFileDialog Pin
MikeBr13-Apr-20 23:26
MikeBr13-Apr-20 23:26 
AnswerRe: Targa files displayed in openFileDialog Pin
OriginalGriff14-Apr-20 0:19
mvaOriginalGriff14-Apr-20 0: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.