Skip navigation
Jörg Wendland
Currently Being Moderated

Accept: */* in LrHttp.get/post

Feb 15, 2012 5:19 AM

Tags: #headers #http #lrhttp

Hi everybody,

I am interfacing a REST service that can either return XML or JSON which it will decide upon the value of the Accept Request Header.

I can set it, of course, like this:

 

LrHttp.get(url, {{field='Accept', value='application/json'}})

 

Lightroom (3.6 here) then sends this header:

 

GET /blaa HTTP/1.1

Host: whatever

Accept: */*, application/json

 

Now the service return HTTP/400 because of the '*/*' in the Accept-Header (reproducible with curl).

I have no control over the service as I am only a consumer, is there any chance I can tell LrHttp to send the Accept header without prepending '*/*'?

 

Thanks in advance,

  Jörg

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points