Get HTTP Status Code from HTTP Utils PostJsonToUrl

I need to send an object as json, to another service, and would like to use the HTTP Utils PostJsonToUrl-operation. However I don’t seem to be able to extract the HTTP Status Code from the operation?

My code looks like this:
HttpStatusCode? crmLogResponse = WebConfigurationManager.AppSettings["ExternalLoggingUrl"].PostJsonToUrl(logRequest).GetResponseStatus()

Any help?

Thanks.

Use the Response Filter:

var response = url.PostJsonToUrl(request, responseFilter: res => ...)

Thanks for the reply, but I’m still drawing a blank.
Could you elaborate on your example? What comes after the res => :smiley:

Nevermind - figured it out. Thanks :smiley: